1

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?

0

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).

  • Event streams have another benefit: they are a data source. You can treat the event stream as the single source of truth and consider all databases as derived views of that event stream. See for example the NYT architecture: confluent.io/blog/publishing-apache-kafka-new-york-times – Joeri Sebrechts Jan 8 at 8:30
  • What you mention is not a benefit of Event Streams, but of Event Stores. You can use Kafka as an event store, but you can't use Azure Event Hub for that ("Event Hubs Standard tier currently supports a maximum retention period of seven days. Event hubs are not intended as a permanent data store."). In any case, I wouldn't personally go that route for the question's scenario. I still prefer the benefits from the service bus that I mention in my answer. But thanks for the article, it's very interesting. – Francesc Castells Jan 9 at 6:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.