You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/26 10:58:13 UTC
[GitHub] [pulsar] nakonczy opened a new issue #8722: RedeliveryCount is 0 on redelivery
nakonczy opened a new issue #8722:
URL: https://github.com/apache/pulsar/issues/8722
**Describe the bug**
I have a pulsar server with a single topic and a message produced to the topic.
It is a standalone server.
I have a client app having a single consumer.
Subscription type is Shared.
When I receive the message, and then stop the client app before ack-ing, and then start the client app again, then the message is redelivered as expected, but with redeliveryCount=0 (expected 1).
Similarily, when the consumer reconnects due to temporary lack of connectivity to pulsar server before ack-ing, then the redelivered message has the redeliveryCount=0.
**To Reproduce**
Steps to reproduce the behavior:
1. Receive a message.
2. Block connectivity. I did it like this:
`sudo iptables -I INPUT -p tcp -m tcp --dport 6650 -j REJECT`
3. Acknowledge the message while there's no connectivity
4. Wait longer than ping timeout (keepaliveIntervalMillis?, default is 30sec.)
5. Unblock connectivity:
`sudo iptables -D INPUT -p tcp -m tcp --dport 6650 -j REJECT`
6. Reconnect will occur and message will be redelivered (as expected), but, it's redeliveryCount will be 0 (not 1).
OR:
1. Receive a message.
2. Stop the client app without ack-ing the message.
3. Start client app again.
4. Redelivery occurs with redeliveryCount=0.
**Expected behavior**
Redelivered message's redeliveryCount value should be 1 instead of 0.
**Desktop (please complete the following information):**
- OS: Ubuntu 18
- Using Java pulsar client.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] asgeirrr commented on issue #8722: RedeliveryCount is 0 on redelivery
Posted by GitBox <gi...@apache.org>.
asgeirrr commented on issue #8722:
URL: https://github.com/apache/pulsar/issues/8722#issuecomment-938436134
I can confirm this behaviour on Pulsar 2.8.1 using the Python client and shared subscription mode. My experiments suggest that the broken forgets redelivery counts for the consumer name when the last consumer with that name disconnects. This IMHO prevents implementing reliable dead-letter policy. A message that always leads to OOM or an exception will never reach DLQ if there is just one consumer.
If my observations are correct, is there any way for the broker to save redelivery counts for some time even after the last consumer with that name disconnects? Thank you for any help or explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] asgeirrr edited a comment on issue #8722: RedeliveryCount is 0 on redelivery
Posted by GitBox <gi...@apache.org>.
asgeirrr edited a comment on issue #8722:
URL: https://github.com/apache/pulsar/issues/8722#issuecomment-938436134
I can confirm this behaviour on Pulsar 2.8.1 using the Python client and shared subscription mode. My experiments suggest that the broken forgets redelivery counts for the given consumer name when the last consumer with that name disconnects. This IMHO prevents implementing reliable dead-letter policy. A message that always leads to OOM or an exception will never reach DLQ if there is just one consumer.
If my observations are correct, is there any way for the broker to save redelivery counts for some time even after the last consumer with that name disconnects? Thank you for any help or explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on issue #8722: RedeliveryCount is 0 on redelivery
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #8722:
URL: https://github.com/apache/pulsar/issues/8722#issuecomment-739885605
Hi @nakonczy , Currently only the client call redeliver messages(use redelivery method or enable ack timeout) will result in the message redelivery count increase. The redelivery count is introduced by the DLQ feature in Pulsar originally. If the connection broker also lead to the redelivery count increase, the consumer might never process the message but the message delivered to the DLQ.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org