Kenneth Giusti f059bba6ae Prevent rabbit from raising unexpected exceptions
Publishing a message using the kombu connection autoretry method may
allow exceptions from the py-amqp library to be raised up to the
application. This does not conform to the documented oslo.messaging
API.

Enhance the try except block to capture any exception and translate it
into a MessageDeliveryFailure.

There are a few cases where exceptions will be raised during autoretry
publishing: recoverable connection or channel errors, and
non-recoverable connection or channel errors.

autoretry will only retry if the error is recoverable. Non recoverable
errors are re-raised immediately regardless of the retry count.

In the case of a recoverable error it seems unlikely that retrying
either the connection or the channel yet again is going to get us
anywhere, so in this case we simply clean up the channel state, log an
error and fail the operation.

In the case of non-recoverable error we are out of luck (think
authentication failure) - further retrying will not help.  Best we can
do is clean up state and log the heck out of it.

Change-Id: I2f65d2ee19a8c3e9a323b30404abbf0cbb45a216
Closes-Bug: #1705351
Closes-Bug: #1707160
2017-08-21 09:36:39 -04:00
2017-07-31 11:28:28 +01:00
2015-09-24 18:11:22 +08:00
2017-07-28 21:05:03 +00:00
2017-03-30 12:32:58 +00:00
2014-06-05 22:48:44 +02:00
2017-01-02 11:34:02 +01:00
2017-04-08 22:39:02 +08:00
2017-03-04 01:51:17 +00:00
2017-06-22 11:02:49 +08:00

Team and repository tags

image

Oslo Messaging Library

Latest Version

Downloads

The Oslo messaging API supports RPC and notifications over a number of different messaging transports.

Description
OpenStack library for messaging
Readme 36 MiB
Languages
Python 99.8%
Shell 0.2%