Skip to content

React to Changes

DDD CQRS ES

The reactive layer responds to state changes that have already happened. It propagates changes across aggregates, maintains read-optimized views, coordinates multi-step processes, and bridges to external systems — all without coupling back to the code that produced the original change.

Core Concepts

Event Handlers

Event handlers consume domain events and orchestrate side effects — syncing state across aggregates, sending notifications, or triggering downstream processes. They follow a fire-and-forget pattern and operate within their own transaction boundaries.

Learn more about event handlers →

Process Managers

Process managers coordinate multi-step business processes that span multiple aggregates. They react to events, maintain their own state, and issue commands to drive other aggregates forward.

Learn more about process managers →

Projections CQRS ES

Projections are read-optimized, denormalized views built from domain events. They provide fast query access without loading full aggregate graphs, forming the read side of CQRS.

Learn more about projections →

Projectors CQRS ES

Projectors are specialized event handlers responsible for maintaining projections. They listen to domain events and update projection data, bridging the write and read sides of CQRS.

Learn more about projectors →

Query Handlers CQRS ES

Query handlers process named read intents (queries) and return results from projections. They are the read-side counterpart of command handlers, dispatched via domain.dispatch(query).

Learn more about query handlers →

Subscribers

Subscribers consume messages from external message brokers and other systems outside the domain boundary. They serve as an anti-corruption layer, translating external data into domain operations.

Learn more about subscribers →

CloudEvents Interoperability CQRS ES

When events need to cross system boundaries — external APIs, Kafka topics, webhooks, or other Protean domains — CloudEvents serialization translates between Protean's internal metadata and the standard format. Protean is a compliant CloudEvents v1.0 producer and consumer.

Learn more about CloudEvents interoperability →

Event Upcasting CQRS ES

When event schemas evolve, upcasters transform old event versions to match the current schema during replay. This is essential for long-lived event-sourced systems.

Learn more about event upcasting →

See also

Stream Categories — How messages are organized and routed through named streams.