In my architecture, which is somewhat constrained due to my client’s corporate IT’s fear of the cloud and anything non-Windows, I am looking at how to dispatch events to web services that can handle them. I have two load-balanced web servers where the web services live, and a SQL Server active/passive cluster of 2 servers. Currently I have EventStore running as a Single Node service on the cluster, set up with failover, etc (I am considering other clustered alternatives for ES). I am trying to decide how best to handle subscriptions/dispatch of events in this setup. I can think of a few options, but am wondering if anyone has any advice, or alternative/better approaches.
1 - Services can subscribe directly to ES streams, would have to handle idempotence/competing consumer issues
2 - I can write my own “simple” bus process, that subscribes to events and dispatches them to services via a load-balanced URI, so that only one consumer handles them.
- in this approach, consumers could subscribe to streams/event types using a standard API (e.g. a POST of the event itself to a URI), or it could be more complex where the bus actually does some mapping of the event to a related command, but that seems like too much coupling
3 - I could stick something like RabbitMQ in between ES and services to handle the competing consumers and other stuff, but saw in other threads most consider this overkill, which I can appreciate.
Has anyone done something similar? Any critiques or suggestions?