Hiya,
So I’m just wondering what the best way might be to solve the following:
We have a service that handles certain events in the standard, competing consumer pattern. It also needs to handle other events which need to be handled by ALL instances of that service rather than by a single one.
What is the recommended approach for this?
We tried setting up 2 endpoints per instance but, looking at the description of logical endpoints for licencing purposes, this actually ends up being (number of instances + 1) endpoints due to them needing a unique endpoint name to subscribe with. Is there a way to do it without creating so many logical endpoints? Ideally we would limit it to a single endpoint per service rather than the 2 anyway.
Thanks,
AB
Hi @abarnybox,
What you are describing sounds a bit like the Data distribution pattern.
Please note the recommendations in the documentation linked above:
Asynchronous messaging is not a good solution for data distribution scenarios. It is usually better to use a dedicated data distribution technology, such as a distributed cache or distributed configuration service. These kinds of technologies are difficult to implement because of the inevitable race conditions and consensus issues but several have evolved that solve these problems elegantly.
Are you able to share some context on the business scenario you are trying to solve that requires this?
Just so you are aware, it is possible to override the routing using RouteToSpecificInstance
in conjunction with making instances uniquely addressable. But I’d be reluctant to recommend that approach without knowing more about your scenario.
Regards,
Andreas
Hi @Andreas_Bednarz ,
Thank you for you reply. I hadn’t spotted that article!
The case we were looking at is for config distribution so I will look into the Distributed Configuration Services.
Regards,
AB