Skip to content

Commit

Permalink
Add MessageNacked to recoverable errors
Browse files Browse the repository at this point in the history
When the broker is answering with a MessageNacked, we can safely retry.

Signed-off-by: Arnaud Morin <[email protected]>
Change-Id: Ica162f29e855637f5677b08f8452dcce879a5056
  • Loading branch information
arnaudmorin authored and auvipy committed Jun 12, 2023
1 parent f778218 commit c6ed09a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion amqp/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .abstract_channel import AbstractChannel
from .channel import Channel
from .exceptions import (AMQPDeprecationWarning, ChannelError, ConnectionError,
ConnectionForced, RecoverableChannelError,
ConnectionForced, MessageNacked, RecoverableChannelError,
RecoverableConnectionError, ResourceError,
error_for_code)
from .method_framing import frame_handler, frame_writer
Expand Down Expand Up @@ -179,6 +179,7 @@ class Connection(AbstractChannel):
channel_errors = (ChannelError,)
recoverable_connection_errors = (
RecoverableConnectionError,
MessageNacked,
socket.error,
IOError,
OSError,
Expand Down

0 comments on commit c6ed09a

Please sign in to comment.