qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: Whether to use Queues or Topics.. ?
Date Tue, 02 Oct 2012 13:45:09 GMT

As Phil mentioned, using durable subscriptions is one way of doing it.

You could also use Queues in this case as long as you use 1 queue per node.
When your "client" sends a message it will end up in all the nodes
"interested" in your message.

Lets say you send a message to the following address "amq.topic/abc"
... "abc" here is the subject and is mapped to the routing key in AMQP

If you have nodes with queues bound to amq.topic with binding key
"abc" then all of them will get the message.
Your nodes can have the following address when they create their subscriptions.

"node1; {create: always, durable: true,
x-binding:{exchange:'amq.topic', key:abc}}"

This address will create a queue named "node1", mark it as durable and
then bind it to the amq.topic exchange using the key 'abc'.
If you don't want the messages to survive a server restart then you
can ommit the durable flag.

Hope this helps.


On Tue, Oct 2, 2012 at 7:35 AM, Phil Harvey <phil@philharveyonline.com> wrote:
> Have you considered JMS durable subscriptions?
> They are described here:
> http://docs.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/basics.html
> On 2 October 2012 11:43, Sajith Kariyawasam <sajhak@gmail.com> wrote:
>> Hi all,
>> My requirement is to notify a cluster of nodes, when an event is occurred..
>>  nodes will be different based on client Id, one client can have more than
>> one node...
>> In message broker, I will have one queue per client (Say queue1, queue2.. )
>> , and nodes will be listening to their relevant queue ... so, in this case
>> more than one node (say node1, node2 and node3) listening to one queue
>> (Say, queue1)
>> I realize that if one node(say node1)  reads the message from the queue,
>> the message is gone, so that the other nodes (node1 and node2) will not be
>> notified..
>> Hence I thought of using Topics instead.. but there the problem I face is
>> that the messages published on topics are not persisted, if one node misses
>> a message (that node may be down at the time of message receiving) it never
>> gonna get the message again (if the node is rebooted)..
>> Are there any other construct that I can use or a combination of Queues and
>> Topics for my use case?
>> --
>> Best Regards
>> Sajith

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message