Use RabbitMq's competing consumers
charlessolar opened this issue · comments
Something to look into -
Currently the competing consumer implementation has every consumer reading from the store, discarding events that are not in their assigned bucket. An implementation completely written into Aggregates.NET.
It occurs to me that libraries like RabbitMq support competing consumers out of the box and in a much nicer way then my solution.
I could
A) Have a little consumer reading from the store sending all events to the main consumer exchange to be processed by any number of actual consumers
B) Have NSB publish written events to rabbitmq in addition to writing to the store - the domain consumer who is reading events that itself generated could forward events out to RabbitMq as well, avoiding the distributed transaction.
Fixed