Reputation: 39
I'm trying to implement functionality similar to Google Cloud Messaging. I want to send message from server side, and retrive same message on Android device. I chose RabbitMQ as an "engine". On the client side I created listener and bind it to queue. In some cases I want to send message to every device. And it's working. But in other cases I want to send message to one specific device. Is it possible? I saw that in message metadata is field consumer tag, that is unique. How can I send message to that specific consumer tag?
Upvotes: 2
Views: 1020
Reputation: 1
If you want to send message to specific consumer, look at direct exchange http://www.rabbitmq.com/tutorials/tutorial-four-java.html
Upvotes: 0
Reputation: 174494
RabbitMQ (AMQP) has no concept of a message selector; you need a separate queue for each device. You can use a topic exchange to route to individual (or all) devices using an appropriate routing key.
Upvotes: 1