Hi Yubiao: > I'm a little curious why the message will lose, could you explain it?
for example, user have two messageId batchMessageId = (ledgerId = 1, entryId = 1, batchIndex = 0, batchSize = 20) messageId = (ledgerId = 1, entryId = 1, batchSize = 20) if the user wants to ack the smallest messageId, they use the compareTo with messageId and batchMessageId, they always will use the messageId, then the batchIndex 1-29 will lose. I have to change the PIP when `MessageIdImpl compareTo(BatchMessageIdImpl)` or `BatchMessageIdImpl compareTo(MessageIdImpl)` will throw an exception. so in this way, this will not still exist this situation. Thanks, Bo Yubiao Feng <yubiao.f...@streamnative.io.invalid> 于2022年12月19日周一 02:54写道: > > Hi Bo > > > Disadvantages of the current compareTo() implementation: Many users may > use this method incorrectly, resulting in seek, ack, or resetCursor use > incorrect MessageId, which has the risk of losing messages, because they > will use a larger messageId to seek, ack etc. > > I'm a little curious why the message will lose, could you explain it? > > Thanks > Yubiao > > On Fri, Dec 16, 2022 at 5:31 PM 丛搏 <bog...@apache.org> wrote: > > > Hi, pulsar community: > > > > I start a PIP about modifying MessageIdImpl and BatchMessageIdImpl > > compareTo(MessageId o) method > > > > original discussion thread: > > https://lists.apache.org/thread/8n3oyk2hdsskkotnj4lnlvfnndctpqbg > > > > PIP: https://github.com/apache/pulsar/issues/18957 > > > > Thanks, > > Bo > >