Skip to content

Commit

Permalink
fix NPE when startMessageId is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiang Haiting committed Oct 11, 2021
1 parent 4d52e95 commit b5c3e93
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,7 @@ public CompletableFuture<Boolean> hasMessageAvailableAsync() {
if (lastDequeuedMessageId == MessageId.earliest) {
// if we are starting from latest, we should seek to the actual last message first.
// allow the last one to be read when read head inclusively.
if (startMessageId.equals(MessageId.latest)) {
if (MessageId.latest.equals(startMessageId)) {

CompletableFuture<GetLastMessageIdResponse> future = internalGetLastMessageIdAsync();
// if the consumer is configured to read inclusive then we need to seek to the last message
Expand Down

0 comments on commit b5c3e93

Please sign in to comment.