saga-flow

eventstream.md (EventStream Documentation)

```markdown

EventStream Framework

Overview

EventStream is an extension to the SagaFlow framework, providing a domain event publisher/subscriber mechanism. It allows publishing domain events throughout a system and enables components to subscribe to specific or generic events.

Key Components:

Advanced Features:

Example Usage

```java EventBus eventBus = new EventBus(); EventPublisher eventPublisher = new EventPublisher(eventBus);

// Subscribe to DomainEvent eventBus.subscribe(new GenericEventSubscriber());

// Publish an event OrderCreatedEvent event = new OrderCreatedEvent(“12345”); eventPublisher.publish(event);