-
Notifications
You must be signed in to change notification settings - Fork 38
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
Negative acknowledge doesn't work with message_id #178
Comments
Yeah it's a bug that pulsar-client-python/pulsar/__init__.py Line 1508 in bf8524a
We should check more types here. |
Oh, it's not the issue with type checking. It's a regression that was introduced by #121. I will push a fix ASAP and include it in the incoming 3.4.0 release. |
BewareMyPower
added a commit
to BewareMyPower/pulsar-client-python
that referenced
this issue
Dec 25, 2023
Fixes apache#178 ### Motivation apache#121 introduces a regression that when `negative_acknowledge` accepts a message ID, the underlying `acknowledgeAsync` method will be called. ### Modifications Fix the `Consumer_negative_acknowledge_message_id` method and add the test for negative acknowledging message IDs in `test_redelivery_count`.
BewareMyPower
added a commit
that referenced
this issue
Dec 26, 2023
Fixes #178 ### Motivation #121 introduces a regression that when `negative_acknowledge` accepts a message ID, the underlying `acknowledgeAsync` method will be called. ### Modifications Fix the `Consumer_negative_acknowledge_message_id` method and add the test for negative acknowledging message IDs in `test_redelivery_count`.
RobertIndie
pushed a commit
that referenced
this issue
Dec 26, 2023
Fixes #178 ### Motivation #121 introduces a regression that when `negative_acknowledge` accepts a message ID, the underlying `acknowledgeAsync` method will be called. ### Modifications Fix the `Consumer_negative_acknowledge_message_id` method and add the test for negative acknowledging message IDs in `test_redelivery_count`. (cherry picked from commit b9c7219)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The docs state:
Specifically, that you can pass either the message or the message id into the function. However, I don't believe this is correct, and passing the message id does not work. To reproduce this issue, first run a local pulsar standalone instance, via
And then run the following code:
When you pass in the message_id, no redeliveries occur. When you comment out the last line and swap to passing in the message as a whole, redeliveries occur.
Why using the message id matters: Our services consume the pulsar messages and convert them into non-pulsar structures (like pydantic objects or other python classes). We attach the message id to those objects so we can ack/nack them as needed without storing the entire original pulsar message
I suspect the general acknowledge method has the same bug in it.
The text was updated successfully, but these errors were encountered: