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: [email protected]
For additional commands, e-mail: [email protected]



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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to