qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ffrenchm <ffrench.mathi...@gmail.com>
Subject Re: tests on exclusive queue
Date Tue, 24 Mar 2009 18:27:48 GMT

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
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
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
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?


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 - / 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 - / 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

View raw message