Trying to design a service that can take order requests and start the transportation process for those orders. Trying to do these in an event-driven way. So the service of the order will emit a transport request event but I am not able to figure out how will cancellation for a transport request will rollout as there can be a lot of transport request already before this cancellation gets it turn. Also, i read that creating topics per entity is not a good idea.
Asked
Active
Viewed 286 times
1 Answers
0
In this scenario, All Order related activity is happening sequentially but cancellation can happen at anytime. So if you need to apply this, you need to use
separate topic
for cancellation with same partitioning
Note: same partitioning is important here because it will decide the consuming instance, same entity with same key should go to same application instance. So number of partition should be equal to main topic partition number.

nipuna
- 3,697
- 11
- 24
-
WIll there be any way to generate per order service using Kafka stream or Kafka branching? because with the approach, we may have to have different topics for other updates like changing transport priority for an order, etc, and for debugging as well it will be a bit difficult. This page talks about it , but donot clearly mentions the solution. I like your approach, just i think it would have been much simpler if there was something on kafka topic which can give me complete information about the transport request from key_id. – Ak67 May 30 '21 at 13:13