Question

I'm creating a set of Microservices following Event-Driven Architecture using Event-Carried State Transfer to move state from one service to another.

Given the following services;

  • Order service
  • Shipping service

The Shipping service will subscribe to OrderStarted, ProductAddedToOrder OrderAccepted events and use those events to build up a local datastore.

However, I'm a little confused as to whether an enterprise service bus (Azure Service Bus) or an event streaming service (Azure Event Hubs, Kafka etc) would be more appropriate.

For this type of architecture which would be more ideal and why?

Was it helpful?

Solution

For your scenario, an enterprise service bus like Azure Service Bus is better suited as they are designed specifically for it. Because of this, you can benefit from several features like retries, automatic deadlettering, transactional sends with receive, automatic deduplication, etc.

Event streams are most suited for scenarios with huge amounts of events (even millions per second) where the speed of processing is what's most important, that's why some of the previously mentioned features are not available (to make the message delivery as light as possible).

Licensed under: CC-BY-SA with attribution
scroll top