Skip to content

Commit a68fa9c

Browse files
Johnathan WalkerCopilot
andcommitted
Fix missing offsetString in EventContext checkpoint update
EventContext.updateCheckpointAsync() only called setOffset(Long) (deprecated), but BlobCheckpointStore.updateCheckpoint() reads getOffsetString() which returned null - causing offset to never be stored in the checkpoint blob metadata. Added setOffsetString(eventData.getOffsetString()) to match the pattern already used in EventBatchContext. Fixes #46752 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d55cdf5 commit a68fa9c

File tree

1 file changed

+1
-0
lines changed
  • sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models

1 file changed

+1
-0
lines changed

sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public Mono<Void> updateCheckpointAsync() {
9494
.setConsumerGroup(partitionContext.getConsumerGroup())
9595
.setPartitionId(partitionContext.getPartitionId())
9696
.setSequenceNumber(eventData.getSequenceNumber())
97+
.setOffsetString(eventData.getOffsetString())
9798
.setOffset(eventData.getOffset());
9899
return this.checkpointStore.updateCheckpoint(checkpoint);
99100
}

0 commit comments

Comments
 (0)