qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Kargapolov <dmitriy.kargapo...@gmail.com>
Subject message accept confirmation
Date Thu, 19 Mar 2009 16:57:48 GMT
Hi,
I'm playing with C++ Qpid broker M4 and .NET client (Win32).
Test scenario looks this way:
1) open connection
2) create a session (timeout = 0 sec)
3) declare a queue (durable, exclusive)
4) subscribe to the queue
5) transfer test message to the exchange
6) wait until message arrives from the queue
7) accept the message
8) close session
9) close connection

When I run this test, it works just fine. But the message left in the queue
after test completed! Second pass returns 2 messages - new and old one, 3rd
pass - 3 messages etc.

I was able to "fix" this in various ways:
1) If I add short delay (100ms) between steps 7) and 8), accepted message
successfully deleted from the queue.
Obviously this way is ugly.
2) If session is created with some expiration timeout, 1st try works fine.
But second try got locked due to exclusive subscription of the 1st session
which still exists in the broker (until timeout expired). Definitely this is
not what I want.

What I do not understand - why message didn't get deleted when session
closed? I'm sure, accept command reached broker _before_ session ends.
Is it bug or normal behavior per AMQP 0-10 spec?
Is there any elegant way to make sure accepted message was actually deleted
from the queue before leaving session?

Thank you.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message