Azure / Azure/azure-sdk-for-java

[QUERY] In azure-messaging-eventhubs, what's the Track2 equivalent for storing partition checkpoint on partition close

Open
#49,146 2 comments 0 reactions 0 assignees View on GitHub
Event Hubs
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 8h
Merged PRs (30d)
178

Description

## Context
In Track1, we can save the partition context on partition close by:
```java
@Override
public void onClose(PartitionContext partitionContext, CloseReason closeReason) throws Exception{
partitionContext.checkpoint();
closeCallback.invoke(Done.getInstance());
}
```

In Track2, we only have
```java
public EventProcessorClientBuilder processPartitionClose(Consumer closePartition) {
this.processPartitionClose = closePartition;
return this;
}
```
And there's no `checkpiont()` method in [PartitionContext](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/PartitionContext.java#L13) to store partition checkpoint anymore.

## Question
Is the removal of this "checkpoint on partition close" behavior in Track2 intended? If so, we should explicitly call this out in migration guide.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.