Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-topics consumer could receive old messages after seek #388

Merged

Conversation

BewareMyPower
Copy link
Contributor

@BewareMyPower BewareMyPower commented Jan 22, 2024

Motivation

See apache/pulsar#21945

Modifications

In C++ client, the multi-topics consumer receives messages by
configuring internal consumers with a message listener that adds
messages to incomingMessages_. So this patch pauses the listeners
before seek and resumes them after seek.

Add MultiTopicsConsumerTest.testSeekToNewerPosition for test.

@BewareMyPower BewareMyPower marked this pull request as draft January 22, 2024 12:29
### Motivation

See apache/pulsar#21945

### Modifications

In C++ client, the multi-topics consumer receives messages by
configuring internal consumers with a message listener that adds
messages to `incomingMessages_`. So this patch pauses the listeners
before seek and resumes them after seek.

Add `MultiTopicsConsumerTest.testSeekToNewerPosition` for test.
@BewareMyPower BewareMyPower force-pushed the bewaremypower/multi-consumer-seek branch from 73e3089 to d65f123 Compare January 24, 2024 05:07
@BewareMyPower BewareMyPower changed the title (WIP) Fix seek failure by timestamp Fix multi-topics consumer could receive old messages after seek Jan 24, 2024
@BewareMyPower BewareMyPower self-assigned this Jan 24, 2024
@BewareMyPower BewareMyPower added this to the 3.5.0 milestone Jan 24, 2024
@BewareMyPower BewareMyPower added the bug Something isn't working label Jan 24, 2024
@BewareMyPower BewareMyPower marked this pull request as ready for review January 24, 2024 05:10
@BewareMyPower
Copy link
Contributor Author

@merlimat @shibd @RobertIndie Could any of you take a look?

@BewareMyPower BewareMyPower merged commit a1e2b4a into apache:main Feb 2, 2024
12 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/multi-consumer-seek branch February 2, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants