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

getRedeliveryCount always return 0 #296

Open
franck-mahieu opened this issue Feb 10, 2023 · 4 comments
Open

getRedeliveryCount always return 0 #296

franck-mahieu opened this issue Feb 10, 2023 · 4 comments

Comments

@franck-mahieu
Copy link

franck-mahieu commented Feb 10, 2023

Hello,

Is there a way to make message.getRedeliveryCount() return the number of time a message has been redelivered?
I hope it's not a problem between the chair and the keyboard, but in my case, the function always returns 0.

I tried to let the default parameters on subscribe, but it doesn't change anything.
There is no disconnection of the client between each redelivery.
The message is well nack each time.

i use pulsar-client v1.8 and kezhenxu94/pulsar pulsar container (pulsar 2.10.0).

@izumo27
Copy link
Contributor

izumo27 commented Feb 17, 2023

@franck-mahieu Which subscription type did you use?
Currently, Message.getRedeliveryCount() always return 0 if subscription type is Exclusive or Failover.

@fabianwikstrom
Copy link

Hi. I seem to have this issue as well. I have several messages in the backlog that I know have been processed by a consumer based on the service logs. When I inspect the message, there is no redeliveryCount property set which is causing my consumer to go into an infinite loop reprocessing. I have the Shared subscription type

@izumo27 and help appreciated :)

@izumo27
Copy link
Contributor

izumo27 commented Mar 8, 2024

@fabianwikstrom Could you explain what 'inspect the message' means? I would like to see the consumer code.

@fabianwikstrom
Copy link

Hi @izumo27 . We figured it out. Turns out that we have batchIndexAckEnabled enabled on the consumer but not on the broker and that is what led to the redelivery loop. I'll close my other issue

Thank you for the quick response!

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

No branches or pull requests

3 participants