Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions emf/common/integrations/rabbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _process_messages(self, basic_deliver, properties, body):
try:
logger.info(f"Handling message with handler: {message_handler.__class__.__name__}")
body, properties = message_handler.handle(body, properties=properties, channel=None)
if properties.header['success'] == False: # stop processing next handlers if message success was set to false
if not properties.headers['success']: # stop processing next handlers if message success was set to false
break

except Exception as error:
Expand Down Expand Up @@ -396,6 +396,7 @@ def __init__(self,
self._vhost = vhost
self._queue = queue
self._username = username
self.heartbeat = heartbeat
self._executor = ThreadPoolExecutor()
self._executor_stopped = False

Expand Down Expand Up @@ -581,7 +582,7 @@ def _process_messages(self, basic_deliver, properties, body):
for message_handler in self.message_handlers:
logger.info(f"Handling message with handler: {message_handler.__class__.__name__}")
body, properties = message_handler.handle(body, properties=properties, channel=self._channel)
if properties.header['success'] == False: # stop processing next handlers if message success was set to false
if not properties.headers['success']: # stop processing next handlers if message success was set to false
break
except Exception as error:
logger.error(f"Message handling failed: {error}", exc_info=True)
Expand Down
Loading