SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

Question about publishing 1 message for multiple subscribers #142

Closed pjfanning closed 6 years ago

pjfanning commented 6 years ago

I used the example subscriber in https://github.com/SpinGo/op-rabbit#set-up-a-consumer-topic-subscription and the related publish code. This worked ok. I modified my code to use 2 subscribers but found that all messages were delivered to 1 or other subscriber but not both. Would someone be able to tell me how to get the message delivered to the 2 subscribers?

pjfanning commented 6 years ago

What I was doing wrong was that the subscribers all used the same queue name - this needs to be unique per subscriber if you want all of them to receive the messages for the shared routing key.