Failover subscription sends first message to multiple consumers
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
**Describe the bug**
I have two consumers connected using a `Failover` subscription to the same topic. I first run one consumer, and after a few minutes, I run the second consumer (no messages are being produced yet).
Once both consumers are up, I start publishing messages to the topic. When this happens, **both** consumers get the first message, and from there, only the selected *active consumer* gets the subsequent messages.
It looks like a bug to me, but if this is expected, I would appreciate if you could point me out to any kind of documentation in this regard.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a `persistent` non-partitioned topic.
2. Create two consumers in `Failover` mode and run them.
3. Create a producer and start publishing messages to the topic.
4. See first message being received by both consumers.
**Expected behavior**
Only the active consumer should get **all** messages.
**Desktop (please complete the following information):**
- OS: Linux (NixOS)
**Additional context**
Here are a few things that might be relevant.
Pulsar version: `2.10.0`
Pulsar Java client: `2.10.0`
I have deduplication enabled on my broker configuration:
```
brokerDeduplicationEnabled=true
```
Messages published to the topic have an `orderingKey`, as I have other service running in `KeyShared` subscription mode reading the very same messages.
Contributor guide
Assessment
This issue has not been assessed yet.