You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Bhavesh Patel <bh...@onrampwireless.com> on 2012/01/17 23:43:10 UTC

Adding two queues in one address string

Hello,

Is there a way in qpid to create two queue in one address string.
I have two exchange type headers and fanout. I want to create
separate queue for this two exchange type in one address string.

Say we have following address strings in python:
addr1 = "Queue1; {create: always, node: {type: queue, x-declare: {auto-delete :'False', exchange:'<exchange_1>', type:fanout, arguments:{'qpid.file_count':5, 'qpid.file_size':256}}, x-bindings:[{queue: Queue1, exchange:'<exchange_1>'}]}}"

addr2 = "Queue2; {create: always, node:{type: queue, x-declare: {auto-delete: 'True', exchange:'<exchange_2>', type:headers}, x-bindings: [{exchange: '<exchange_2>', queue: Queue2}]}}"

Can we combine above two address strings in one ?

Thanks, any help would be appreciated.




---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Adding two queues in one address string

Posted by Gordon Sim <gs...@redhat.com>.
On 01/17/2012 10:43 PM, Bhavesh Patel wrote:
> Is there a way in qpid to create two queue in one address string.

No

> I have two exchange type headers and fanout. I want to create
> separate queue for this two exchange type in one address string.

May I ask why? Addresses are used to determine where messages should be 
sent to or received from. You can't create a single sender that will 
send to both exchanges or a single receiver that will receive from two 
queues. What do you perceive as the benefit in using one address rather 
than two?

> Say we have following address strings in python:
> addr1 = "Queue1; {create: always, node: {type: queue, x-declare: {auto-delete :'False', exchange:'<exchange_1>', type:fanout, arguments:{'qpid.file_count':5, 'qpid.file_size':256}}, x-bindings:[{queue: Queue1, exchange:'<exchange_1>'}]}}"
>
> addr2 = "Queue2; {create: always, node:{type: queue, x-declare: {auto-delete: 'True', exchange:'<exchange_2>', type:headers}, x-bindings: [{exchange:'<exchange_2>', queue: Queue2}]}}"
>
> Can we combine above two address strings in one ?

I would assume you are using these to create receivers (since if you 
create senders with them, the senders would still send to the queue 
directly not to the exchange). You will need two receivers to receive 
from two distinct queues.

However if what you want is to create one receiver and receive messages 
sent to either of two exchanges, then you could do that (but above you 
have different queue properties in each case).

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org