Skip to content

Commit

Permalink
chore: add print statement after successfull message publish
Browse files Browse the repository at this point in the history
  • Loading branch information
sandronadiradze committed Oct 28, 2024
1 parent befd940 commit 1384e57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apis/rabbitmq/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def publish_event(self, body: Any, headers: Dict[str, str], routing_key: str):
properties=properties,
mandatory=True, # Ensures the message gets routed correctly
)
print(f"Publishing event with body: {body}, and headers: {headers}")
except (ChannelWrongStateError, AMQPConnectionError) as e:
print(
f"Failed to publish message due to {str(e)}. Attempting to reconnect..."
Expand Down

0 comments on commit 1384e57

Please sign in to comment.