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