I have a specific case that I would like to solve using an Azure Messaging Service, but I'm not sure which one to use. There are 7 to choose from and I think I have narrowed it down to 2 options.
- Azure Service Bus Topic
- Azure Event Hubs
I will try to explain my needs using the following diagram. Please bare in mind that this is just a fictional scenario, just to illustrate what I'm after.
- A user updates a Product. An HTTP request is send to an MVC application.
- The MVC applications puts a
UpdateProductCommand
on the bus (what Azure Bus?) - Inside Azure, wether it is an Azure Function, or something else, the command must be processed.
- Inside the command handler I want to publish an Event telling all listening parties that a certain task has been processed.
- So an
ProductUpdatedEvent
gets published - There will be more than 1 application interested in consuming this event. These apps can live inside Azure as an Azure Function. But it must also be possible for applications to consume events that are hosted on an external server. Inside my own IIS server for example.
Requirements:
- When an application/eventhandler that consumes an event goes down for x time, and later gets up again, then it should be able to process all the events it missed.
- An event can be consumed by more than one event handler. All event handlers should process the event.
- An event must be able to carry data. Like on the right in the screenshot. I want to be able to send data about the product that got updated.
Which Azure Messaging Service technology would best fit this description?