Skip to content

Commit c6ed09a

Browse files
arnaudmorinauvipy
authored andcommitted
Add MessageNacked to recoverable errors
When the broker is answering with a MessageNacked, we can safely retry. Signed-off-by: Arnaud Morin <[email protected]> Change-Id: Ica162f29e855637f5677b08f8452dcce879a5056
1 parent f778218 commit c6ed09a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

amqp/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from .abstract_channel import AbstractChannel
1515
from .channel import Channel
1616
from .exceptions import (AMQPDeprecationWarning, ChannelError, ConnectionError,
17-
ConnectionForced, RecoverableChannelError,
17+
ConnectionForced, MessageNacked, RecoverableChannelError,
1818
RecoverableConnectionError, ResourceError,
1919
error_for_code)
2020
from .method_framing import frame_handler, frame_writer
@@ -179,6 +179,7 @@ class Connection(AbstractChannel):
179179
channel_errors = (ChannelError,)
180180
recoverable_connection_errors = (
181181
RecoverableConnectionError,
182+
MessageNacked,
182183
socket.error,
183184
IOError,
184185
OSError,

0 commit comments

Comments
 (0)