getRedeliveryCount always return 0
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).
@franck-mahieu Which subscription type did you use?
Currently, Message.getRedeliveryCount() always return 0 if subscription type is Exclusive or Failover.
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 :)
@fabianwikstrom Could you explain what 'inspect the message' means? I would like to see the consumer code.
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!