Kamil K
Kamil K

Reputation: 39

Cloud messaging in RabbitMQ

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

Answers (2)

mielmat
mielmat

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

Gary Russell
Gary Russell

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

Related Questions