pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

fix batchIdx error for non-batch message

Open wolfstudy opened this issue 3 years ago • 0 comments

Signed-off-by: xiaolongran [email protected]

Motivation

When producer send message or consumer receive message in non-batch, return the batchIdx is 0

msgId: pulsar.trackingMessageID{messageID:pulsar.messageID{ledgerID:11653378, entryID:3807, batchIdx:0, partitionIdx:2}

In fact, when we disable batch in ProducerOptions, we expect the batchIdx is -1

msgId: pulsar.trackingMessageID{messageID:pulsar.messageID{ledgerID:11653378, entryID:3807, batchIdx:-1, partitionIdx:2}

Modifications

  • Get batchIdx from broker

wolfstudy avatar Jan 13 '22 03:01 wolfstudy