You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/24 06:39:58 UTC

[GitHub] [pulsar] startjava created a discussion: How to avoid repeated consumption in Durable subscription?

GitHub user startjava created a discussion: How to avoid repeated consumption in Durable subscription?

My test steps:

(1) Start the producer and produce 50 messages

(2) Start consumers and realize slow consumption with sleep

(3) Ctrl+c aborts the pulsar process

(4) *************************** Because the Consumer has a receiving queue, consumption has not been stopped because of the destruction of the pulsar process. Every time, it is successfully ACKed (is the ACK status information saved locally?)

After restarting the Pulsar and consumers, they will continue to consume at the last location. In this way, repeated consumption occurs,

How to avoid it? thank.

GitHub link: https://github.com/apache/pulsar/discussions/18170

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@pulsar.apache.org


[GitHub] [pulsar] Jason918 added a comment to the discussion: How to avoid repeated consumption in Durable subscription?

Posted by GitBox <gi...@apache.org>.
GitHub user Jason918 added a comment to the discussion: How to avoid repeated consumption in Durable subscription?

> Every time, it is successfully ACKed (is the ACK status information saved locally?)

Not likely, client `ack` need RPC to be persisted to broker.



> After restarting the Pulsar and consumers, they will continue to consume at the last location. In this way, repeated consumption occurs,
> 
> How to avoid it?

Are you talking about exactly-once message delivery? Normally, we don't need it. The best practice would be implement idempotent message process at consumer side.

If you are talking about minimizing message duplication, it's another story. 


GitHub link: https://github.com/apache/pulsar/discussions/18170#discussioncomment-3947849

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@pulsar.apache.org