[Bug] Bundle unload can cause shared consumer receive duplicate messages
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
3.0.4
### Minimal reproduce step
1. two node broker
2. three client process use same shared subscription to consumer one topic
3. consumer receiveQueue 5
4. consumer cost 3 second to handle each message and then ack
5. unload topic from brokerA to brokerB
6. three client process may receive some messages that already in receiveQueue of other consumer ; which will finally cause the same message be handled by two consumer
### What did you expect to see?
bundle unload will not cause message duplication
### What did you see instead?
bundle unload will not cause unacked message deliver to other consumer, which will cause data duplication
### Anything else?
I think when consumer reconnected, consumer should first tell broker what messages they already hold , broker should redeliver these messages;
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
No source files or tests are named. Start by reproducing the two-broker, three-consumer scenario on Pulsar 3.0.4, then trace bundle unload and consumer reconnection handling; done means messages already held by one consumer are not delivered to another during unload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100