Skip to content

hasMessageAvailable should return false when Reader read from latest messages - #5023

Merged
sijie merged 3 commits into
apache:masterfrom
zymap:pulsar_reader
Nov 19, 2019
Merged

sijie merged 3 commits into
apache:masterfrom
zymap:pulsar_reader

Conversation

@zymap

@zymap zymap commented Aug 23, 2019 •

Copy link
Copy Markdown
Member

Fixes #4912

Motivation

When a reader that configured reading from the latest message, hasMessageAvailable will timeout or hang on.

Modifications

Make sure lastDequeuedMessage initialised with right position.

@jiazhai jiazhai assigned jiazhai and zymap and unassigned jiazhai Aug 23, 2019
@jiazhai jiazhai added this to the 2.5.0 milestone Aug 23, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the test for both the default case and when startMessageInclusive() is set?

@sijie

sijie commented Aug 25, 2019

Copy link
Copy Markdown
Member

@zymap please address the review comments

@sijie

sijie commented Sep 2, 2019

Copy link
Copy Markdown
Member

@zymap please address the comments

@zymap

zymap commented Sep 3, 2019

Copy link
Copy Markdown
Member Author

@sijie ok.

@zymap

zymap commented Oct 12, 2019

Copy link
Copy Markdown
Member Author

@sijie @merlimat Sorry for the late response. PTAL

zymap added 2 commits October 24, 2019 16:50
…t messages

---

Fixes apache#4912

*Motivation*

When the reader read from the latest message, `hasMessageAvailable` will timeout or hang on.

*Modifications*

Make `lastDequeuedMessage` start position should keep with `startMessageId`.
@zymap

zymap commented Nov 11, 2019

Copy link
Copy Markdown
Member Author

@sijie @merlimat PTAL. Thanks

@sijie

sijie commented Nov 12, 2019

Copy link
Copy Markdown
Member

@merlimat can you review this again as @zymap added the tests?

@sijie
sijie merged commit bfcfdf6 into apache:master Nov 19, 2019
@sijie sijie modified the milestones: 2.5.0, 2.4.3 Nov 19, 2019
@sijie sijie modified the milestones: 2.4.3, 2.6.0 Jan 22, 2020
@sijie sijie modified the milestones: 2.6.0, 2.5.0 Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java client Reader readNext and hasMessageAvailable not working when attempting to find last message in topic

5 participants