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

fix: handle keyerror in azureservicebus transport when message is not found in qos and perform basic_ack #1691

Merged
merged 3 commits into from Apr 11, 2023

Conversation

IsmaelJS
Copy link
Contributor

@IsmaelJS IsmaelJS commented Apr 10, 2023

Related to #1661
When no_ack=True, the received message is not appended into qos, and thus KeyError is raised when trying to ack it.
This fix aims to handle that KeyError when trying to get the message from qos and perform the super basic_ack.

@IsmaelJS IsmaelJS changed the title fix: handle keyerror when message is not found in qos and perform basic_ack fix: handle keyerror in azureservicebus transport when message is not found in qos and perform basic_ack Apr 10, 2023
@auvipy auvipy self-requested a review April 11, 2023 04:53
@auvipy auvipy added this to the 5.3 milestone Apr 11, 2023
try:
queue_obj.receiver.complete_message(delivery_info['azure_message'])
except azure.servicebus.exceptions.MessageAlreadySettled:
delivery_info = self.qos.get(delivery_tag).delivery_info
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR! we need to verify this change with some unit tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@IsmaelJS IsmaelJS requested a review from auvipy April 11, 2023 15:06
@auvipy auvipy merged commit ff031f7 into celery:main Apr 11, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants