Hi Gordon,

It took some experimenting, but at the end I managed to reproduce it with
qpid-send (rev 1540863):
$ /usr/local/libexec/qpid/tests/qpid-send -b admin/admin@localhost:20000
--address "my-test-queue-2; { node: { type: queue }, assert: never, create:
never }" --connection-options "{ protocol: 'amqp1.0' }" --messages 1000
qpid-send: Link detached by peer with amqp:precondition-failed:
resource-limit-exceeded: Maximum depth exceeded on my-test-queue-2:
current=[count: 10, size: 10624], max=[count: 10, size: 1024000000]
(/home/jakub/qpid/qpid-trunk/cpp/src/qpid/broker/Queue.cpp:1623)

The key for reproducing it with qpid-send seems to be sending a lot of
messages. I usually needed at least 50 on my host. With just few messages
it doesn't seem to happen.

I have also another clue which might help you find what the problem is ...
in my application, if I close only the session and connection it will stuck
in the close() call. But if I first call sender.close() everything seems to
work fine.

Thanks & Regards
Jakub



On Mon, Nov 11, 2013 at 10:53 AM, Gordon Sim <[email protected]> wrote:

> On 11/09/2013 12:46 AM, Jakub Scholz wrote:
>
>> Hi,
>>
>> I have C++ client using the qpid.messaging API to send messages to a queue
>> on the C++ broker. The code block where I'm sending the messages is
>> surrounded with try-catch and when I catch an exception I simply try to
>> close the connection and exit the program:
>>
>> try {
>>      ...
>>      sender.send(msg, false);
>>      ...
>> }
>> catch (...) {
>>      connection.close();
>> }
>>
>> When using AMQP 0.10 and sending a message into a queue which is already
>> full, the connaction.close() call returns and I can exit the program. But
>> with AMQP 1.0 when I receive the same exception, the connection.close()
>> call seems to hang "forever" and never return.
>>
>> With other exceptions - for example with unauthorized access - the
>> connection.close() returns fine. I believe the resource-limit-exceeded
>> error does close the connection from the broker side. That might be the
>> reason for the different behaviour. But I would still expect that the
>> close() call should not hang.
>>
>> Is the error handling as I implemented it not correct - i.e. do I have to
>> specifically catch the exceptions which close the connection? Or is this a
>> bug in the AMQP 1.0 implementation?
>>
>
> It would be a bug for close() to hang. I haven't been able to reproduce
> this yet. I modified qpid-send to remove the session sync and close, which
> makes the pattern there broadly similar to what you have above.
>
> However, I can then send using either 0-10 or 1.0 to a full queue and seem
> to always get the exception and successfully close the connection. This is
> on r1540138.
>
> Can you give me any further clues on how to reproduce? Can you reproduce
> using qpid-send (even unmodified it should be broadly similar)?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to