You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by ffrenchm <ff...@gmail.com> on 2009/03/18 18:14:46 UTC

tests on exclusive queue

Hello,

I'm going to make some tests with exclusive queue.

I declare them exclusive thanks a patched qpid-console published 
https://issues.apache.org/jira/browse/QPID-1758 here .

test 1  :
----------

after restart I loose my exclusive option on my queue and there is a strange
behavior 
when I try to redefine my queue...

$./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
$./qpid-config -a localhost:5671 queues
Queue Name                 Attributes
==================================================
TEST                       --durable excl --file-size=24 --file-count=8
reply-dekatonshir.18810.1  auto-del excl
topic-dekatonshir.18810.1  auto-del excl

(restart qpidd)

$./qpid-config -a localhost:5671 queues
Queue Name                 Attributes
==================================================
TEST                       --durable --file-size=24 --file-count=8
reply-dekatonshir.18838.1  auto-del excl
topic-dekatonshir.18838.1  auto-del excl
$./qpid-config -a localhost:5671 del queue TEST --force
$./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
$./qpid-config -a localhost:5671 queues
Queue Name                 Attributes
==================================================
TEST                       --durable --file-size=24 --file-count=8
TEST                       --durable excl --file-size=24 --file-count=8
reply-dekatonshir.18919.1  auto-del excl
topic-dekatonshir.18919.1  auto-del excl

(restart qpidd)

$./qpid-config -a localhost:5671 queues
Queue Name                 Attributes
==================================================
TEST                       --durable --file-size=24 --file-count=8
reply-dekatonshir.18967.1  auto-del excl
topic-dekatonshir.18967.1  auto-del excl

test 2  :
-----------

I define an exclusive queue TEST and then I start 2 JMS consumers on this
queue. When starting the 
second consumer I do not have any options telling me that there is already a
consumer on my exclusive
queue. I start a JMS publisher which send a lot of messages : the two
consumers are receiving messages...

Do I make some mistakes here ? I do no understand where ....


Thanks for all
 
-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2498394.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Rajith Attapattu <ra...@gmail.com>.
Hi ffrenchm,

I just tested this feature and it works as expected.
When I start my second listerner on the same destination (which is
declared exclusive) then I get the following exception.
org.apache.qpid.transport.SessionException: ch=0 id=0
ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2,
classCode=8, commandCode=1, fieldIndex=0, description=resource-locked:
Cannot grant exclusive access to queue message_queue
(qpid/broker/SessionAdapter.cpp:384), errorInfo={})

When you run your test case, could you please have a look at the
broker logs and see if there is any error messages?
You should see something like this
2009-mar-25 11:33:50 error Execution exception: resource-locked:
Cannot grant exclusive access to queue message_queue
(qpid/broker/SessionAdapter.cpp:384)

Also if you are using M4, could you please try with trunk and see.

Regards,

Rajith

On Wed, Mar 25, 2009 at 5:17 AM, ffrenchm <ff...@gmail.com> wrote:
>
> on the trunk when I open my JMSListener with this JNDI configuration :
>
> java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> connectionfactory.local = amqp://guest:guest@clientid/testpath?brokerlist='tcp://127.0.0.1:26969'
> destination.TEST = direct://amq.direct//TEST?routingkey='TEST'&exclusive='true'&durable='true'
>
> and I do a qpid-config -a localhost:26969 queues I've this result (my JMSListener is always running):
>
> Queue Name                Attributes
> =============================================
> TEST                      --durable
> reply-dekatonshir.6565.1  auto-del excl
> topic-dekatonshir.6565.1  auto-del excl
>
> Then I start second JMSListener with the same JNDI configuration and I do not have any error. The TEST queue is clearly not exclusive in this case...
>
> ++
>
>
> ffrenchm wrote:
>> So what I understand is that exclusive queue can be durable ! What do you think about?
>>
>> Thanks
>>
> That's fine.  You can create an exclusive and durable queue.  However
> once the session that created it closes, it will no longer be
> exclusive.  So if the broker is restarted (thus closing all open
> sessions), the queue will still be there but it will not be exclusive.
>
> -Ted
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
>
>
> --
> View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2531417.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

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


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
on the trunk when I open my JMSListener with this JNDI configuration :

java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
connectionfactory.local = amqp://guest:guest@clientid/testpath?brokerlist='tcp://127.0.0.1:26969'
destination.TEST = direct://amq.direct//TEST?routingkey='TEST'&exclusive='true'&durable='true'

and I do a qpid-config -a localhost:26969 queues I've this result (my JMSListener is always running):

Queue Name                Attributes
=============================================
TEST                      --durable
reply-dekatonshir.6565.1  auto-del excl
topic-dekatonshir.6565.1  auto-del excl

Then I start second JMSListener with the same JNDI configuration and I do not have any error. The TEST queue is clearly not exclusive in this case...

++


ffrenchm wrote:
> So what I understand is that exclusive queue can be durable ! What do you think about?
>
> Thanks
>   
That's fine.  You can create an exclusive and durable queue.  However 
once the session that created it closes, it will no longer be 
exclusive.  So if the broker is restarted (thus closing all open 
sessions), the queue will still be there but it will not be exclusive.

-Ted


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




-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2531417.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Ted Ross <tr...@redhat.com>.
ffrenchm wrote:
> So what I understand is that exclusive queue can be durable ! What do you think about?
>
> Thanks
>   
That's fine.  You can create an exclusive and durable queue.  However 
once the session that created it closes, it will no longer be 
exclusive.  So if the broker is restarted (thus closing all open 
sessions), the queue will still be there but it will not be exclusive.

-Ted


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


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
I discover another potential problem in my use case. When you try to create an durable and exclusive queue with JNDI like this :

destination.TEST = direct://amq.direct//TEST?routingkey='TEST'&exclusive='true'&durable='true'

The created queue is only durable... I read this on JIRA 314:

Queues declared exclusive should always be treated as auto-delete

But it's not my understanding of AMQP spec 0.10 which say about exclusive:

Exclusive queues can only be used from one session at a time. Once a session declares an exclusive
queue, that queue cannot be used by any other session until the declaring session closes.

and about auto-delete :

If this field is set and the exclusive field is also set, then the queue MUST be deleted when the
session closes. If this field is set and the exclusive field is not set the queue is deleted when all the
consumers have finished using it. Last consumer can be cancelled either explicitly or because its
session is closed. If there was no consumer ever on the queue, it won't be deleted.

and about durable :

If set when creating a new queue, the queue will be marked as durable. Durable queues remain
active when a server restarts. Non-durable queues (transient queues) are purged if/when a server
restarts. Note that durable queues do not necessarily hold persistent messages, although it does not
make sense to send persistent messages to a transient queue.

So what I understand is that exclusive queue can be durable ! What do you think about?

Thanks


I just updated the trunk and there is no exception raised currently - the session is only closed :

INFO [apache.qpid.client.AMQSession] Closing session: org.apache.qpid.client.AMQSession_0_10@df1832 ...

Do you have an idea when QPID M5 will be available ?


ffrenchm wrote:
> Do I need to raise a JIRA for this exception problem (if it's one) or is there any convolution ?
> 
> Thanks !
> 
> 
> I test again exclusive queue through JNDI. My first listener create an exclusive queue. My second listener is blocked and wait that my first listner unlock my queue. I would prefer to get an exception in this case and not an simple debug message like this : 
> 
> IoReceiver - /127.0.0.1:26969 2009-03-24 10:38:08,859 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2, classCode=8, commandCode=1, fieldIndex=0, description=resource-locked: Cannot grant exclusive access to queue TEST (qpid/broker/SessionAdapter.cpp:388), errorInfo={})
> 
> is this possible ? 
> 
> The problem is that after I get this exception because of timeout : 
> 
> IoReceiver - /127.0.0.1:26969 2009-03-24 10:40:08,597 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ConnectionHeartbeat()
> Exception in thread "main" org.apache.qpid.transport.SessionException: timed out waiting for sync: complete = 1, point = 3
> 	at org.apache.qpid.transport.Session.sync(Session.java:684)
> 	at org.apache.qpid.transport.Session.sync(Session.java:653)
> 	at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:324)
> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:647)
> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:488)
> 	at com.axway.test.queuer.QueueListener.JMSQListener.main(JMSQListener.java:168)
> 
> And unfortunately it could be confusing and bad interpreted...
> 
> Do I need to raise a JIRA ?

This should be fixed on trunk and will be part of the 0.5 release. It 
was an issue with the JMS clients exception handling tracked by QPID-1708.

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






-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2528251.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Carl Trieloff <cc...@redhat.com>.
.5 was meant to be this week, but I expect it will be a week or two late.

Carl.

ffrenchm wrote:
> I just updated the trunk and there is no exception raised currently - the session is only closed :
>
> INFO [apache.qpid.client.AMQSession] Closing session: org.apache.qpid.client.AMQSession_0_10@df1832 ...
>
> Do you have an idea when QPID M5 will be available ?
>
>
> ffrenchm wrote:
>   
>> Do I need to raise a JIRA for this exception problem (if it's one) or is there any convolution ?
>>
>> Thanks !
>>
>>
>> I test again exclusive queue through JNDI. My first listener create an exclusive queue. My second listener is blocked and wait that my first listner unlock my queue. I would prefer to get an exception in this case and not an simple debug message like this : 
>>
>> IoReceiver - /127.0.0.1:26969 2009-03-24 10:38:08,859 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2, classCode=8, commandCode=1, fieldIndex=0, description=resource-locked: Cannot grant exclusive access to queue TEST (qpid/broker/SessionAdapter.cpp:388), errorInfo={})
>>
>> is this possible ? 
>>
>> The problem is that after I get this exception because of timeout : 
>>
>> IoReceiver - /127.0.0.1:26969 2009-03-24 10:40:08,597 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ConnectionHeartbeat()
>> Exception in thread "main" org.apache.qpid.transport.SessionException: timed out waiting for sync: complete = 1, point = 3
>> 	at org.apache.qpid.transport.Session.sync(Session.java:684)
>> 	at org.apache.qpid.transport.Session.sync(Session.java:653)
>> 	at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:324)
>> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:647)
>> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:488)
>> 	at com.axway.test.queuer.QueueListener.JMSQListener.main(JMSQListener.java:168)
>>
>> And unfortunately it could be confusing and bad interpreted...
>>
>> Do I need to raise a JIRA ?
>>     
>
> This should be fixed on trunk and will be part of the 0.5 release. It 
> was an issue with the JMS clients exception handling tracked by QPID-1708.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
>
>
>   


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
I just updated the trunk and there is no exception raised currently - the session is only closed :

INFO [apache.qpid.client.AMQSession] Closing session: org.apache.qpid.client.AMQSession_0_10@df1832 ...

Do you have an idea when QPID M5 will be available ?


ffrenchm wrote:
> Do I need to raise a JIRA for this exception problem (if it's one) or is there any convolution ?
> 
> Thanks !
> 
> 
> I test again exclusive queue through JNDI. My first listener create an exclusive queue. My second listener is blocked and wait that my first listner unlock my queue. I would prefer to get an exception in this case and not an simple debug message like this : 
> 
> IoReceiver - /127.0.0.1:26969 2009-03-24 10:38:08,859 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2, classCode=8, commandCode=1, fieldIndex=0, description=resource-locked: Cannot grant exclusive access to queue TEST (qpid/broker/SessionAdapter.cpp:388), errorInfo={})
> 
> is this possible ? 
> 
> The problem is that after I get this exception because of timeout : 
> 
> IoReceiver - /127.0.0.1:26969 2009-03-24 10:40:08,597 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ConnectionHeartbeat()
> Exception in thread "main" org.apache.qpid.transport.SessionException: timed out waiting for sync: complete = 1, point = 3
> 	at org.apache.qpid.transport.Session.sync(Session.java:684)
> 	at org.apache.qpid.transport.Session.sync(Session.java:653)
> 	at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:324)
> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:647)
> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:488)
> 	at com.axway.test.queuer.QueueListener.JMSQListener.main(JMSQListener.java:168)
> 
> And unfortunately it could be confusing and bad interpreted...
> 
> Do I need to raise a JIRA ?

This should be fixed on trunk and will be part of the 0.5 release. It 
was an issue with the JMS clients exception handling tracked by QPID-1708.

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




-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2528154.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Gordon Sim <gs...@redhat.com>.
ffrenchm wrote:
> Do I need to raise a JIRA for this exception problem (if it's one) or is there any convolution ?
> 
> Thanks !
> 
> 
> I test again exclusive queue through JNDI. My first listener create an exclusive queue. My second listener is blocked and wait that my first listner unlock my queue. I would prefer to get an exception in this case and not an simple debug message like this : 
> 
> IoReceiver - /127.0.0.1:26969 2009-03-24 10:38:08,859 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2, classCode=8, commandCode=1, fieldIndex=0, description=resource-locked: Cannot grant exclusive access to queue TEST (qpid/broker/SessionAdapter.cpp:388), errorInfo={})
> 
> is this possible ? 
> 
> The problem is that after I get this exception because of timeout : 
> 
> IoReceiver - /127.0.0.1:26969 2009-03-24 10:40:08,597 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ConnectionHeartbeat()
> Exception in thread "main" org.apache.qpid.transport.SessionException: timed out waiting for sync: complete = 1, point = 3
> 	at org.apache.qpid.transport.Session.sync(Session.java:684)
> 	at org.apache.qpid.transport.Session.sync(Session.java:653)
> 	at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:324)
> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:647)
> 	at org.apache.qpid.client.AMQSession.close(AMQSession.java:488)
> 	at com.axway.test.queuer.QueueListener.JMSQListener.main(JMSQListener.java:168)
> 
> And unfortunately it could be confusing and bad interpreted...
> 
> Do I need to raise a JIRA ?

This should be fixed on trunk and will be part of the 0.5 release. It 
was an issue with the JMS clients exception handling tracked by QPID-1708.

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


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
Do I need to raise a JIRA for this exception problem (if it's one) or is there any convolution ?

Thanks !


I test again exclusive queue through JNDI. My first listener create an exclusive queue. My second listener is blocked and wait that my first listner unlock my queue. I would prefer to get an exception in this case and not an simple debug message like this : 

IoReceiver - /127.0.0.1:26969 2009-03-24 10:38:08,859 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2, classCode=8, commandCode=1, fieldIndex=0, description=resource-locked: Cannot grant exclusive access to queue TEST (qpid/broker/SessionAdapter.cpp:388), errorInfo={})

is this possible ? 

The problem is that after I get this exception because of timeout : 

IoReceiver - /127.0.0.1:26969 2009-03-24 10:40:08,597 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ConnectionHeartbeat()
Exception in thread "main" org.apache.qpid.transport.SessionException: timed out waiting for sync: complete = 1, point = 3
	at org.apache.qpid.transport.Session.sync(Session.java:684)
	at org.apache.qpid.transport.Session.sync(Session.java:653)
	at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:324)
	at org.apache.qpid.client.AMQSession.close(AMQSession.java:647)
	at org.apache.qpid.client.AMQSession.close(AMQSession.java:488)
	at com.axway.test.queuer.QueueListener.JMSQListener.main(JMSQListener.java:168)

And unfortunately it could be confusing and bad interpreted...

Do I need to raise a JIRA ?



-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2527990.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
I test again exclusive queue through JNDI. My first listener create an exclusive queue. My second listener is blocked and wait that my first listner unlock my queue. I would prefer to get an exception in this case and not an simple debug message like this : 

IoReceiver - /127.0.0.1:26969 2009-03-24 10:38:08,859 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ExecutionException(errorCode=RESOURCE_LOCKED, commandId=2, classCode=8, commandCode=1, fieldIndex=0, description=resource-locked: Cannot grant exclusive access to queue TEST (qpid/broker/SessionAdapter.cpp:388), errorInfo={})

is this possible ? 

The problem is that after I get this exception because of timeout : 

IoReceiver - /127.0.0.1:26969 2009-03-24 10:40:08,597 DEBUG [apache.qpid.transport.Connection] RECV: [conn:1c86be5] ch=0 ConnectionHeartbeat()
Exception in thread "main" org.apache.qpid.transport.SessionException: timed out waiting for sync: complete = 1, point = 3
	at org.apache.qpid.transport.Session.sync(Session.java:684)
	at org.apache.qpid.transport.Session.sync(Session.java:653)
	at org.apache.qpid.client.AMQSession_0_10.sendClose(AMQSession_0_10.java:324)
	at org.apache.qpid.client.AMQSession.close(AMQSession.java:647)
	at org.apache.qpid.client.AMQSession.close(AMQSession.java:488)
	at com.axway.test.queuer.QueueListener.JMSQListener.main(JMSQListener.java:168)

And unfortunately it could be confusing and bad interpreted...

Do I need to raise a JIRA ?


See my comment on QPID-1758. It's not meaningful to create an exclusive 
queue with qpid-config because that queue will be exclusive to the 
session created by qpid-config.

My understanding is that a queue is declared 'exclusive' by the client 
that wants to use it. Once the session closes, the queue is available 
for other sessions but the exclusive attribute no longer holds unless 
it's re-declared.

-Ted

ffrenchm wrote:
> Hello again, 
>
> is there anybody who can explains me where I'm wrong on my tests or if there
> is any bug about it ?
>
> Thanks
>
>
>
> ffrenchm wrote:
>   
>> Hello,
>>
>> I'm going to make some tests with exclusive queue.
>>
>> I declare them exclusive thanks a patched qpid-console published 
>> https://issues.apache.org/jira/browse/QPID-1758 here .
>>
>> test 1  :
>> ----------
>>
>> after restart I loose my exclusive option on my queue and there is a
>> strange behavior 
>> when I try to redefine my queue...
>>
>> $./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable excl --file-size=24 --file-count=8
>> reply-dekatonshir.18810.1  auto-del excl
>> topic-dekatonshir.18810.1  auto-del excl
>>
>> (restart qpidd)
>>
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable --file-size=24 --file-count=8
>> reply-dekatonshir.18838.1  auto-del excl
>> topic-dekatonshir.18838.1  auto-del excl
>> $./qpid-config -a localhost:5671 del queue TEST --force
>> $./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable --file-size=24 --file-count=8
>> TEST                       --durable excl --file-size=24 --file-count=8
>> reply-dekatonshir.18919.1  auto-del excl
>> topic-dekatonshir.18919.1  auto-del excl
>>
>> (restart qpidd)
>>
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable --file-size=24 --file-count=8
>> reply-dekatonshir.18967.1  auto-del excl
>> topic-dekatonshir.18967.1  auto-del excl
>>
>> test 2  :
>> -----------
>>
>> I define an exclusive queue TEST and then I start 2 JMS consumers on this
>> queue. When starting the 
>> second consumer I do not have any options telling me that there is already
>> a consumer on my exclusive
>> queue. I start a JMS publisher which send a lot of messages : the two
>> consumers are receiving messages...
>>
>> Do I make some mistakes here ? I do no understand where ....
>>
>>
>> Thanks for all
>>  
>>
>>     
>
>   




-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2525604.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Ted Ross <tr...@redhat.com>.
Perhaps you should look at the ACL (access control list) capability of 
the broker.  This allows you to restrict access to resources (i.e. 
queues) based on the authentication identity of the client.

-Ted

ffrenchm wrote:
> I have read this in the AMQP spec too and this is an interesting point. I've the impression this is a something for example which could be improve in the AMQP specification. I mean for example a useful functionality about exclusive queue would to define queue with durable exclusivity and linked to a specific client_id for example... I've the impression that this could not be achieve with AMQP currently... but maybe it's not so useful as I think :)
>
> ++
>
>
> I think this is the relevant text from the AMQP specification (emphasis 
> mine):
>
>     If the server receives a declare, bind, consume or get request for a
>     queue that has been declared as exclusive by an _*existing client
>     session*_, it MUST raise an exception. 
>
> This means that a queue is exclusive only as long as the client session 
> that declared it remains open.  Once the session closes, the exclusive 
> ownership of the queue is released.
>
> This is why the --exclusive switch on qpid-config would be meaningless 
> and why exclusivity cannot be durable.
>
> -Ted
>
>
> ffrenchm wrote:
>   
>> Hello Ted, 
>>
>> my mistake comes in fact from my experience in other queuers where I can set a durable exclusive parameter. What does mean this parameter ? It's mean that in ANY case the queue will be exclusive even if the client do not open an exclusive session... Thanks QMAN I see this parameter exists for the queue. I think you should be able to use it as durable parameter. What do you think about it ?
>>
>> ++
>>
>>
>> See my comment on QPID-1758. It's not meaningful to create an exclusive 
>> queue with qpid-config because that queue will be exclusive to the 
>> session created by qpid-config.
>>
>> My understanding is that a queue is declared 'exclusive' by the client 
>> that wants to use it. Once the session closes, the queue is available 
>> for other sessions but the exclusive attribute no longer holds unless 
>> it's re-declared.
>>
>> -Ted
>>
>>
>>
>>   
>>     
>
>
>
>
>   


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
I have read this in the AMQP spec too and this is an interesting point. I've the impression this is a something for example which could be improve in the AMQP specification. I mean for example a useful functionality about exclusive queue would to define queue with durable exclusivity and linked to a specific client_id for example... I've the impression that this could not be achieve with AMQP currently... but maybe it's not so useful as I think :)

++


I think this is the relevant text from the AMQP specification (emphasis 
mine):

    If the server receives a declare, bind, consume or get request for a
    queue that has been declared as exclusive by an _*existing client
    session*_, it MUST raise an exception. 

This means that a queue is exclusive only as long as the client session 
that declared it remains open.  Once the session closes, the exclusive 
ownership of the queue is released.

This is why the --exclusive switch on qpid-config would be meaningless 
and why exclusivity cannot be durable.

-Ted


ffrenchm wrote:
> Hello Ted, 
>
> my mistake comes in fact from my experience in other queuers where I can set a durable exclusive parameter. What does mean this parameter ? It's mean that in ANY case the queue will be exclusive even if the client do not open an exclusive session... Thanks QMAN I see this parameter exists for the queue. I think you should be able to use it as durable parameter. What do you think about it ?
>
> ++
>
>
> See my comment on QPID-1758. It's not meaningful to create an exclusive 
> queue with qpid-config because that queue will be exclusive to the 
> session created by qpid-config.
>
> My understanding is that a queue is declared 'exclusive' by the client 
> that wants to use it. Once the session closes, the queue is available 
> for other sessions but the exclusive attribute no longer holds unless 
> it's re-declared.
>
> -Ted
>
>
>
>   




-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2526370.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Ted Ross <tr...@redhat.com>.
I think this is the relevant text from the AMQP specification (emphasis 
mine):

    If the server receives a declare, bind, consume or get request for a
    queue that has been declared as exclusive by an _*existing client
    session*_, it MUST raise an exception. 

This means that a queue is exclusive only as long as the client session 
that declared it remains open.  Once the session closes, the exclusive 
ownership of the queue is released.

This is why the --exclusive switch on qpid-config would be meaningless 
and why exclusivity cannot be durable.

-Ted


ffrenchm wrote:
> Hello Ted, 
>
> my mistake comes in fact from my experience in other queuers where I can set a durable exclusive parameter. What does mean this parameter ? It's mean that in ANY case the queue will be exclusive even if the client do not open an exclusive session... Thanks QMAN I see this parameter exists for the queue. I think you should be able to use it as durable parameter. What do you think about it ?
>
> ++
>
>
> See my comment on QPID-1758. It's not meaningful to create an exclusive 
> queue with qpid-config because that queue will be exclusive to the 
> session created by qpid-config.
>
> My understanding is that a queue is declared 'exclusive' by the client 
> that wants to use it. Once the session closes, the queue is available 
> for other sessions but the exclusive attribute no longer holds unless 
> it's re-declared.
>
> -Ted
>
>
>
>   


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
Hello Ted, 

my mistake comes in fact from my experience in other queuers where I can set a durable exclusive parameter. What does mean this parameter ? It's mean that in ANY case the queue will be exclusive even if the client do not open an exclusive session... Thanks QMAN I see this parameter exists for the queue. I think you should be able to use it as durable parameter. What do you think about it ?

++


See my comment on QPID-1758. It's not meaningful to create an exclusive 
queue with qpid-config because that queue will be exclusive to the 
session created by qpid-config.

My understanding is that a queue is declared 'exclusive' by the client 
that wants to use it. Once the session closes, the queue is available 
for other sessions but the exclusive attribute no longer holds unless 
it's re-declared.

-Ted



-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2525689.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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


Re: tests on exclusive queue

Posted by Ted Ross <tr...@redhat.com>.
See my comment on QPID-1758. It's not meaningful to create an exclusive 
queue with qpid-config because that queue will be exclusive to the 
session created by qpid-config.

My understanding is that a queue is declared 'exclusive' by the client 
that wants to use it. Once the session closes, the queue is available 
for other sessions but the exclusive attribute no longer holds unless 
it's re-declared.

-Ted

ffrenchm wrote:
> Hello again, 
>
> is there anybody who can explains me where I'm wrong on my tests or if there
> is any bug about it ?
>
> Thanks
>
>
>
> ffrenchm wrote:
>   
>> Hello,
>>
>> I'm going to make some tests with exclusive queue.
>>
>> I declare them exclusive thanks a patched qpid-console published 
>> https://issues.apache.org/jira/browse/QPID-1758 here .
>>
>> test 1  :
>> ----------
>>
>> after restart I loose my exclusive option on my queue and there is a
>> strange behavior 
>> when I try to redefine my queue...
>>
>> $./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable excl --file-size=24 --file-count=8
>> reply-dekatonshir.18810.1  auto-del excl
>> topic-dekatonshir.18810.1  auto-del excl
>>
>> (restart qpidd)
>>
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable --file-size=24 --file-count=8
>> reply-dekatonshir.18838.1  auto-del excl
>> topic-dekatonshir.18838.1  auto-del excl
>> $./qpid-config -a localhost:5671 del queue TEST --force
>> $./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable --file-size=24 --file-count=8
>> TEST                       --durable excl --file-size=24 --file-count=8
>> reply-dekatonshir.18919.1  auto-del excl
>> topic-dekatonshir.18919.1  auto-del excl
>>
>> (restart qpidd)
>>
>> $./qpid-config -a localhost:5671 queues
>> Queue Name                 Attributes
>> ==================================================
>> TEST                       --durable --file-size=24 --file-count=8
>> reply-dekatonshir.18967.1  auto-del excl
>> topic-dekatonshir.18967.1  auto-del excl
>>
>> test 2  :
>> -----------
>>
>> I define an exclusive queue TEST and then I start 2 JMS consumers on this
>> queue. When starting the 
>> second consumer I do not have any options telling me that there is already
>> a consumer on my exclusive
>> queue. I start a JMS publisher which send a lot of messages : the two
>> consumers are receiving messages...
>>
>> Do I make some mistakes here ? I do no understand where ....
>>
>>
>> Thanks for all
>>  
>>
>>     
>
>   


Re: tests on exclusive queue

Posted by ffrenchm <ff...@gmail.com>.
Hello again, 

is there anybody who can explains me where I'm wrong on my tests or if there
is any bug about it ?

Thanks



ffrenchm wrote:
> 
> Hello,
> 
> I'm going to make some tests with exclusive queue.
> 
> I declare them exclusive thanks a patched qpid-console published 
> https://issues.apache.org/jira/browse/QPID-1758 here .
> 
> test 1  :
> ----------
> 
> after restart I loose my exclusive option on my queue and there is a
> strange behavior 
> when I try to redefine my queue...
> 
> $./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
> $./qpid-config -a localhost:5671 queues
> Queue Name                 Attributes
> ==================================================
> TEST                       --durable excl --file-size=24 --file-count=8
> reply-dekatonshir.18810.1  auto-del excl
> topic-dekatonshir.18810.1  auto-del excl
> 
> (restart qpidd)
> 
> $./qpid-config -a localhost:5671 queues
> Queue Name                 Attributes
> ==================================================
> TEST                       --durable --file-size=24 --file-count=8
> reply-dekatonshir.18838.1  auto-del excl
> topic-dekatonshir.18838.1  auto-del excl
> $./qpid-config -a localhost:5671 del queue TEST --force
> $./qpid-config -a localhost:5671 add queue TEST --exclusive --durable
> $./qpid-config -a localhost:5671 queues
> Queue Name                 Attributes
> ==================================================
> TEST                       --durable --file-size=24 --file-count=8
> TEST                       --durable excl --file-size=24 --file-count=8
> reply-dekatonshir.18919.1  auto-del excl
> topic-dekatonshir.18919.1  auto-del excl
> 
> (restart qpidd)
> 
> $./qpid-config -a localhost:5671 queues
> Queue Name                 Attributes
> ==================================================
> TEST                       --durable --file-size=24 --file-count=8
> reply-dekatonshir.18967.1  auto-del excl
> topic-dekatonshir.18967.1  auto-del excl
> 
> test 2  :
> -----------
> 
> I define an exclusive queue TEST and then I start 2 JMS consumers on this
> queue. When starting the 
> second consumer I do not have any options telling me that there is already
> a consumer on my exclusive
> queue. I start a JMS publisher which send a lot of messages : the two
> consumers are receiving messages...
> 
> Do I make some mistakes here ? I do no understand where ....
> 
> 
> Thanks for all
>  
> 

-- 
View this message in context: http://n2.nabble.com/tests-on-exclusive-queue-tp2498394p2503155.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


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