Skip to content

Commit 0f67239

Browse files
committed
Documentation
1 parent 4693dc0 commit 0f67239

File tree

5 files changed

+83
-590
lines changed

5 files changed

+83
-590
lines changed

docs/core-concepts/event-bus.md

Lines changed: 0 additions & 141 deletions
This file was deleted.

docs/core-concepts/event-store.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,19 @@ Streak provides several `EventStore` implementations out of the box:
8686

8787
3. **`Streak\Infrastructure\Domain\EventStore\PublishingEventStore`**
8888
* This is a **Decorator**. It wraps another `EventStore` implementation.
89-
* After successfully adding events to the wrapped store using `add()`, it publishes those events to an `EventBus`.
90-
* **Use Cases:** Ensures that events are published to listeners *only after* they have been successfully persisted. This is crucial for system consistency.
91-
* **Configuration:** Takes the underlying `EventStore` and an `EventBus` as constructor arguments.
89+
* Ensures events are delivered to listeners after being stored.
90+
* Publishes events to an in-memory event bus used by Streak's infrastructure (e.g., for starting [subscriptions](./listeners.md#running-listeners)).
91+
* Guarantees that events are only published after successful persistence.
92+
* **Use Cases:**
93+
* Reliable event delivery to listeners
94+
* Maintaining consistency between event store and listeners
95+
* Ensuring events are processed in the order they were stored
96+
* **Configuration:** Takes the underlying `EventStore` and event publishing mechanism as constructor arguments.
9297

9398
## Choosing an Implementation
9499

95100
* Use `InMemoryEventStore` for your tests.
96101
* Use `DbalPostgresEventStore` (or potentially other DBAL-based stores if created) for development and production if using PostgreSQL.
97-
* **Always** wrap your primary persistent event store (like `DbalPostgresEventStore`) with `PublishingEventStore` in production/development setups to ensure reliable event publication for read models, process managers, etc.
102+
* **Always** wrap your primary persistent event store with `PublishingEventStore` to ensure reliable event delivery to listeners.
98103

99104
Configuration, especially for the DBAL store and serialization, is typically handled via dependency injection, often simplified by the `StreakBundle` if using Symfony.

0 commit comments

Comments
 (0)