Re: [DISCUSS][Reader] readNext reset message position automatically when enable inclusive

2022-03-16 Thread Zixuan Liu
Thanks @Mattison and @Penghui, Good idea! I consider fixing this in client, then I will improve this in the broker. > This pip is to add a new field to the CommandSubscribe to let the broker know how to set the cursor position. I am also interested in this. PengHui Li 于2022年3月14日周一 23:33写道: >

Re: [DISCUSS][Reader] readNext reset message position automatically when enable inclusive

2022-03-14 Thread PengHui Li
Thanks @Mattison. Yes, It's a long term fix solution, the protocol changes need to upgrade the broker and client and we can only apply the protocol changes to a major release. I think Zixuan is trying to find a short-term fix without protocol changes. Penghui On Mon, Mar 14, 2022 at 5:59 PM mat

Re: [DISCUSS][Reader] readNext reset message position automatically when enable inclusive

2022-03-14 Thread mattison chao
Hi, Zixuan, Very glad you can notice this problem. I am preparing to submit a PIP to resolve this issue. This pip is to add a new field to the CommandSubscribe to let the broker know how to set the cursor position. Feel free to give me more good advice and let me know what you think. Best, Ma

Re: [DISCUSS][Reader] readNext reset message position automatically when enable inclusive

2022-03-14 Thread PengHui Li
Hi Zixuan, We are not able to add `hasMessageAvailable()` check before `readNext()` method. For some cases, they care about if they need to do something if no messages are available, but some cases are not, just continues to read the messages from the topic, so they don't need to check if there ar

[DISCUSS][Reader] readNext reset message position automatically when enable inclusive

2022-03-14 Thread Zixuan Liu
Hi Pulsar community, Currently, the reader support sets the start message id and enables the inclusive. I have a case that always read the latest message, set the MessageId.latest as start message id with enabling the inclusive, the code so like: ``` @Test public void testReaderGetsLatestInclusiv