Skip to content

Commit

Permalink
added README for CQRS ordered events example
Browse files Browse the repository at this point in the history
  • Loading branch information
roblaszczak committed Dec 16, 2024
1 parent 8a96701 commit b930331
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion _examples/basic/6-cqrs-ordered-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,24 @@ This application is using [Watermill CQRS](http://watermill.io/docs/cqrs) compon

Detailed documentation for CQRS can be found in Watermill's docs: [http://watermill.io/docs/cqrs#usage](http://watermill.io/docs/cqrs).

This example, uses event groups to maintain order
This example, uses event groups to maintain order of events. You can read more about them in the [Watermill documentation](https://watermill.io/docs/cqrs/).
We are also using Kafka's partitioning keys to increase processing throughput without losing order of events.


## What does this application do?

This application manages an email subscription system where users can:

1. Subscribe to receive emails by providing their email address
2. Update their email address after subscribing
3. Unsubscribe from the mailing list

The system maintains:
- A current list of all active subscribers
- A timeline of all subscription-related activities

If events won't be ordered, and `SubscriberSubscribed` would arrive after `SubscriberUnsubscribed` event,
the subscriber will be still subscribed.

## Running

Expand Down

0 comments on commit b930331

Please sign in to comment.