apache / apache/pulsar

KeyShared mode bug

Open
#20,813 6 comments 0 reactions 0 assignees View on GitHub
Stale type/bug
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.

### Version

pulsar-clinet 2.10.4
pulsar-server 2.10.1

### Minimal reproduce step

i use pulsar-manage create topic with 2 partitions
i start java application with 5 topics(topic1,topic2,topic3,topic4,topic5)
one topic use one consumer
set listenerThreads=10
set topic1 mode=KeyShared
topic1 bind consumer1 use messageListener
i send 50 messages to topic1

### What did you expect to see?

in key-shared mode 2 threads works because topic1 use one consumer with 2 partitions。
48 messages should wait

### What did you see instead?

10 threads works at the same time。 40messages wait
in shared mode 2 threads works at the same time。 48messages wait

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported Java consumer setup with two partitions, five topics, listenerThreads=10, and KeyShared versus Shared mode. Compare the active consumer threads and queued messages with the expected partition behavior; done when the concurrency difference is understood and the KeyShared result matches its intended semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.