You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Toralf Lund <to...@pgs.com> on 2012/07/13 13:04:12 UTC
Automatic creation of direct exchange via Sender options in C++ messaging
API?
Hi.
I'm wondering if there is any way I can set up options on a
qpid::messaging::Sender so that a direct exchange will be created if
it's missing. I mean, for topic exchanges, I do something like
sender=session.createSender("myexchange; { create: sender, delete:
never, node: { type: topic } }");
Similarly, I make sure queues for receivers exist using
receiver=session.createReceiver("myqueue; { create: receiver, delete:
never, node: { type: queue } }");
But, it seems like only "topic" and "queue" are accepted as arguments to
"type", so how about other exchange types?
- Toralf
This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Automatic creation of direct exchange via Sender options in C++
messaging API?
Posted by Gordon Sim <gs...@redhat.com>.
On 07/13/2012 01:10 PM, Toralf Lund wrote:
> Are the x-declare options to "node" or "link" documented anywhere? I
> have the same question for x-bindings and x-whatever-else-may-exist, of
> course...
Yes, there are some tables near the foot of
http://qpid.apache.org/books/0.16/Programming-In-Apache-Qpid/html/section-addresses.html#idp32388992.
There is also a list of extension arguments:
https://cwiki.apache.org/confluence/display/qpid/Qpid+extensions+to+AMQP. Those
for queue/exchange declare can be passed in the arguments map within an
x-declare.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Automatic creation of direct exchange via Sender options in C++
messaging API?
Posted by Toralf Lund <to...@pgs.com>.
On 13/07/12 13:39, Gordon Sim wrote:
> On 07/13/2012 12:04 PM, Toralf Lund wrote:
>> Hi.
>>
>> I'm wondering if there is any way I can set up options on a
>> qpid::messaging::Sender so that a direct exchange will be created if
>> it's missing. I mean, for topic exchanges, I do something like
>>
>> sender=session.createSender("myexchange; { create: sender, delete:
>> never, node: { type: topic } }");
>>
>> Similarly, I make sure queues for receivers exist using
>>
>> receiver=session.createReceiver("myqueue; { create: receiver, delete:
>> never, node: { type: queue } }");
>>
>> But, it seems like only "topic" and "queue" are accepted as arguments to
>> "type", so how about other exchange types?
>
> The use of 'topic' in that context is more analogous to its use in JMS
> if that is of any use. I.e. it denotes the basic messaging pattern,
> 'pub-sub' as opposed to queue.
>
> You can control the exchange that is created to support the topic and
> it need not be an AMQP 0-10 topic exchange (yes, I agree the
> terminology is confusing!).
Right. I had sort of realised already that the word "topic" should not
be taken to literally. I still couldn't think of a way to control the
exchange type, though.
> To do so you specifying an x-declare map within your node properties,
> and can specify the exchange type within that (the fields inside the
> x-declare correspond to an AMQP 0-10 declare command).
>
> E.g. to create a direct exchange:
>
> "myexchange; {create: sender, node: {type: topic,
> x-declare:{type:direct}}}
Yes, of course. I ought to have guessed that.
This leads me to another question that I've been meaning to ask, though:
Are the x-declare options to "node" or "link" documented anywhere? I
have the same question for x-bindings and x-whatever-else-may-exist, of
course...
- Toralf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Automatic creation of direct exchange via Sender options in C++
messaging API?
Posted by Gordon Sim <gs...@redhat.com>.
On 07/13/2012 12:04 PM, Toralf Lund wrote:
> Hi.
>
> I'm wondering if there is any way I can set up options on a
> qpid::messaging::Sender so that a direct exchange will be created if
> it's missing. I mean, for topic exchanges, I do something like
>
> sender=session.createSender("myexchange; { create: sender, delete:
> never, node: { type: topic } }");
>
> Similarly, I make sure queues for receivers exist using
>
> receiver=session.createReceiver("myqueue; { create: receiver, delete:
> never, node: { type: queue } }");
>
> But, it seems like only "topic" and "queue" are accepted as arguments to
> "type", so how about other exchange types?
The use of 'topic' in that context is more analogous to its use in JMS
if that is of any use. I.e. it denotes the basic messaging pattern,
'pub-sub' as opposed to queue.
You can control the exchange that is created to support the topic and it
need not be an AMQP 0-10 topic exchange (yes, I agree the terminology is
confusing!). To do so you specifying an x-declare map within your node
properties, and can specify the exchange type within that (the fields
inside the x-declare correspond to an AMQP 0-10 declare command).
E.g. to create a direct exchange:
"myexchange; {create: sender, node: {type: topic, x-declare:{type:direct}}}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org