Skip to content

Pulsar 2.5.0 regression: Reader.hasMessageAvailable returns false when startMessageId is the message id of the last message id in startMessageIdInclusive mode #6333

Closed
@lhotari

Description

@lhotari

Description
Reader.hasMessageAvailable returns false when startMessageId is the message id of the last message id in startMessageIdInclusive mode.
If the message id is any other id than the id of the last message, there is no issues.
This problem occurs with Pulsar 2.5.0. The test case passes with Pulsar 2.4.2.

To Reproduce
Steps to reproduce the behavior:

git clone -b has-message-available-2.5.0 https://github.com/lhotari/pulsar-bug-repro
cd pulsar-bug-repro
./gradlew test

The repository that includes the test case is https://github.com/lhotari/pulsar-bug-repro .

To test with Pulsar 2.4.2 (test passes)

git checkout has-message-available-2.4.2
./gradlew cleanTest test

Expected behavior
When using the Reader API and specifying the message id of the message id of the last message that exists in the topic with startMessageIdInclusive mode, then Reader.hasMessageAvailable should return true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    release/2.5.1type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions