Alan Conway wrote:
On 11/30/2009 06:14 AM, Alexei Sosin wrote:
I noted that there is a limitation in .Net client, to receive 10 000 messages only per session. Client just stops receiving them after this number has passed.
Digging into the 0-10 client code, there is a line in ClientSession.cs:
messageFlow(queue, MessageCreditUnit.MESSAGE, 10000);

So the worj-around for me is that client should count messages and re-create session once it hits the limit.

But, why this limitation is there? I see no such limits mentioned in AMQP spec.

Don't know anything about .NET but that's an AMQP flow control command containing the limit. It means the client should not receive more than 10000 *unacknowledged* messages. If your client acknowledges messages as it receives them then it should continue to receive messages. You can set flow control to unlimited but your client needs to acknowledge messages in any case for them to be removed from the queue. You can set your subscription such that no acknowledgment is required but I don't know the .NET API to do so.

This is correct assuming that the flow mode is set to window. If the flow mode is set to credit then there would need to be another messageFlow somewhere in order to get more than 10000 messages.

--Rafael


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

Reply via email to