Open horizonzy opened 2 years ago
What are the scenarios for consumers to use hasMessageAvailable
?
What are the scenarios for consumers to use
hasMessageAvailable
?
I think it's the same with adding getLastMessageId
(#1066).
BTW, there is a case here : https://github.com/apache/pulsar/pull/1066#discussion_r162751622
What are the scenarios for consumers to use
hasMessageAvailable
?
Sorry for delay reply. Not the method hasMessageAvailable is defined in both ConsumerImpl and MultiConsumerImpl.
The behavior is same. So I think the method should upper to parent file BaseConsumer
or Consumer
.
The issue had no activity for 30 days, mark with Stale label.
Now the method
hasMessageAvailable
just is announced in ConsumerImpl and MultiConsumerImpl. If we want to check is there message available, we should transfer Consumer to ConsumerImpl or MultiConsumerImpl, then invoke hasMessageAvailable like below:Maybe we can make method
hasMessageAvailable
to Consumer.