liveBook · Manning

Domain event publishing

As explained in Microservices Patterns, Second Edition

A messaging technique in which a service publishes events representing significant changes to domain entities or aggregates.

Domain event publishing sends events representing significant changes to domain entities or aggregates. It is a higher-level messaging interaction style: a library or framework can hide broker details and provide an API for publishing events. section 8.3.10

DomainEventPublisher domainEventPublisher;

String accountId = ...;

DomainEvent domainEvent = new AccountDebited(...);

domainEventPublisher.publish("Account", accountId, Collections.singletonList(domainEvent));

The Eventuate API publishes an AccountDebited event to the Account channel, associated with an account ID. section 8.3.10

Eventuate also supports event consumers. Its APIs abstract messaging infrastructure; the platform additionally implements the transactional outbox and idempotent consumer patterns. section 8.3.10 section 8.4

How Microservices Patterns, Second Edition covers it

How deep it goes
Shows an Eventuate publishing call and consumer handler while abstracting broker-level implementation details.
Examples
Uses an AccountDebited event published to the Account channel with an account ID.
What you can do after
Apply it via Eventuate's API to publish a domain event associated with an entity identifier.
How it connects
Connects domain event publishing with asynchronous messaging, message brokers, the transactional outbox, and the idempotent consumer.

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.