f059bba6ae

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
Team and repository tags
Oslo Messaging Library
The Oslo messaging API supports RPC and notifications over a number of different messaging transports.
- License: Apache License, Version 2.0
- Documentation: https://docs.openstack.org/oslo.messaging/latest/
- Source: https://git.openstack.org/cgit/openstack/oslo.messaging
- Bugs: https://bugs.launchpad.net/oslo.messaging
Description
Languages
Python
99.8%
Shell
0.2%