Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: Setting Generated Message ID as default value, skipping it while already set #90

Merged
merged 2 commits into from
Jul 26, 2023
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
6 changes: 2 additions & 4 deletions neon_mq_connector/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,8 @@ def emit_mq_message(cls,
:raises ValueError: invalid request data provided
:returns message_id: id of the sent message
"""
if request_data and len(request_data) > 0 and isinstance(request_data,
dict):
message_id = cls.create_unique_id()
request_data['message_id'] = message_id
if request_data and len(request_data) > 0 and isinstance(request_data, dict):
message_id = request_data.setdefault('message_id', cls.create_unique_id())
with connection.channel() as channel:
if exchange:
channel.exchange_declare(exchange=exchange,
Expand Down
Loading