On 12/06/2013 05:52 PM, Marcelo Vieira wrote:
Hi Gordon,
Thanks for reply. I tried to do that anyway, but it seems that did not
work. I have a script that runs as a daemon and creates a session to
read messagens from a queue. Even with x-declare, other scripts can
create sessions to read messages from the same queue, and I need to
avoid this.
So they can consume from the queue even when the session would declared
it as exclusive is still active? Can I ask what version of the server
you are using?
Is there some additional configuration required on the server to do this?
No, there shouldn't be. I did however forget to add in the
'create:always' in the address. And if the queue already exists then the
node properties would have no effect.
So actually a better suggestion might be, e.g.:
'my-queue; {create:always, link:{x-subscribe:{exclusive:True}}}'
That should prevent anyone else consuming from it.
(There are - confusingly - two distinct notions of exclusivity in AMQP
0-10. The queue can be exclusive to a session or the consumer can
request that it is the exclusive consumer0.
On 06-12-2013 13:50, Gordon Sim wrote:
On 12/06/2013 03:43 PM, Marcelo Vieira wrote:
Is there a way to create a new and exclusive queue that accepts only one
session at a time? I'm trying to use 'qpid-config' command for this, is
there any parameter to do that?
I tried using the configuration x-declare: {auto-delete: false,
exclusive: true} in the creation of the session, but it seems to have
had no result
You can't really do it from qpid-config. However you can add that
x-declare to the node properties of the addres you use to create the
sender/receiver/publisher/consumer, e.g
my-queue; {node:{x-declare: {auto-delete: false, exclusive: true}}}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]