You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getLastMessageId from PulsarAdmin doesn't work with BatchMessageIdImpl #6462
Describe the bug
A topic created with a producer in batch mode generates batch messages id : ledgerId:entryId:partitionIndex:batchIndex.
The getLastMessageId method return a MessageIdImpl which doesn't use the batchIndex parameter.
To Reproduce
Send messages with a producer in batch mode :
`
public class ProducerTest {
public static void main(String[] args) throws Exception {
@congbobo184 I don't understand ? If the batchIndex is not stored on the broker side, all the messages of the same batch have the same Message id (as described before, the batch id is the only changing part in the id) ? So it is not possible to target a specific message created inside a batch ?
Activity
congbobo184 commentedon Mar 6, 2020
@kevin-kosmos broker don't store the batchIndex, client only loop set batchIndex.
eladar2000 commentedon Mar 7, 2020
@congbobo184 I don't understand ? If the batchIndex is not stored on the broker side, all the messages of the same batch have the same Message id (as described before, the batch id is the only changing part in the id) ? So it is not possible to target a specific message created inside a batch ?
congbobo184 commentedon Mar 9, 2020
I will fix this, and every time it will return the last of batchIndex.
Fix admin getLastMessageId return batchIndex (#6511)
Fix admin getLastMessageId return batchIndex (apache#6511)
Fix admin getLastMessageId return batchIndex (#6511)
Fix admin getLastMessageId return batchIndex (#6511)
Fix admin getLastMessageId return batchIndex (apache#6511)
Fix admin getLastMessageId return batchIndex (apache#6511)