Reputation: 1925
I'm quite new to the ActiveMQ and I would like to know if it's possible to setup for the following scenario:
Service A and B subscribe to a Pub/Sub topic. This topic I use for event sending, so the interested service can react on it.
Now, if I want to scale the service A, adding one more instance. How can I ensure that both instance won't process the same event? (Ending up create duplicated data).
Is it possible to achieve this in ActiveMQ? If yes, how?
Thanks.
Upvotes: 3
Views: 1747
Reputation: 4306
Vitor Villar you can also use Virtual Topics in ActiveMQ 5.x Virtual Topics are effectively the holy grail of messaging-- you publish to a topic and consume from queues.
ref: Virtual Topic
Upvotes: 1
Reputation: 34998
If you're using JMS then this scenario really needs shared topic subscriptions which were added in JMS 2.0. ActiveMQ 5.x doesn't support JMS 2, but ActiveMQ Artemis (the next generation ActiveMQ broker) does support JMS 2 so you should use that.
Upvotes: 2