Single or multiple topic (stream) to the event "Aggregate root" in kafka

My Order aggregated root is capable of emitting multiple Event , for example. OrderCreated , OrderPaid , OrderCancelled . Will a good design store all types of order events in one kafka theme and have orderId as the message key, as suggested here ? Or should I create a separate topic for each of them?

About the whole topic is that the order of events is supported, but the consumer will need to filter some events at their end. The second approach is the consumer, which will be simpler, because they can subscribe to the exact topic that they need, but to build an Order need to subscribe to several topics, while they do not come from kafka in the correct sequence, since they are from different topics.

thanks

+7
domain-driven-design apache-kafka event-sourcing
source share

No one has answered this question yet.

See similar questions:

184
Using Kafka as an (CQRS) Eventstore. A good idea?

or similar:

10
kafka as an event repository in the event source system
7
Is there a way to maintain ordering messages between sections of a kafka topic with a single consumer?
3
Kafka architecture many sections or many topics?
2
Join several Kafka themes by keywords
one
Kafka filtering / Dynamic topic creation
one
Apache Kafka Streams Interactive Queries - How to create a repository in which a value is an entity, not an aggregation
one
Kafka Streams - you can reduce the number of internal themes created by several aggregates
one
Event Sourcing - Apache Kafka + Kafka Streams - How to ensure atomicity / transaction
0
Apache Kafka Streams and Event Sourcing, CQRS and Validation
0
Several types of messages in one topic Kafka with Avro

All Articles