lujiwen opened a new issue, #19551:
URL: https://github.com/apache/pulsar/issues/19551

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Motivation
   
   Geo-replication feature helps us a lot to replicate messages from one 
cluster to another cluster geographically. However, duplicated messages can 
occur when the subscription state snapshot is not synchronized correctly 
between the source and target clusters. We are trying to solve this problem.
   
   ### Solution
   
   I found the snapshot will only be taken when the consumer acknowledges a 
message and advance the subscription cursor we have some snapshot in the cache 
whose messageId is older than the latest one. 
   However, some latest cursor positions will not be replicated to the remote 
cluster for the snapshot request will only issue every second. 
   To solve this problem, we want to set up a scheduled task to run once a 
second, which will sync the latest subscription cursor position even when the 
consumer failed and will not advance the cursor any further, but the broker is 
still alive.
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to