Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for external store for checkpoint. #2572

Open
nageshs28 opened this issue Feb 7, 2023 · 3 comments
Open

Support for external store for checkpoint. #2572

nageshs28 opened this issue Feb 7, 2023 · 3 comments

Comments

@nageshs28
Copy link

Expected Behavior
Azure Event hubs provide Kafka API compatibility and provides sdk for blob storage.
https://learn.microsoft.com/en-us/java/api/overview/azure/messaging-eventhubs-checkpointstore-blob-readme?view=azure-java-stable
Can spring-kafka has similar offering so that we can plugin server details and checkpoints are taken care of.

https://learn.microsoft.com/en-us/java/api/overview/azure/messaging-eventhubs-checkpointstore-blob-readme?view=azure-java-stable

Current Behavior
Kafka creates its own store for offset mgmt.

Context

@garyrussell
Copy link
Contributor

Spring for Apache Kafka is a pure Kafka library; I don't think it is appropriate to provide support for vendor extensions in the core project.

It is easy to use an external state store with Spring for Apache Kafka

  • use AckMode.MANUAL and store the offset(s) in the external store instead of calling Acknowledgment.acknowledge()
  • extend AbstractConsumerSeekAware and seek to the externally stored offset(s) when partitions are assigned.

Such an extension probably belongs in some other project; for example: https://spring.io/projects/spring-cloud-azure which is maintained by Microsoft.

If it makes sense to create such an extension and, if the extension requires any additional hooks in this project, we'd be more than happy to receive a generic pull request.

@artembilan
Copy link
Member

The Event Hubs is a messaging broker. It is essentially not Apache Kafka.
It is nice of Azure that they provide a compatibility with Kafka client, so there is not too much on the consumer/producer side to know that essentially we deal with Event Hubs.
The blob store is really that messaging broker feature, nothing to do with the client lib.
Since Spring for Apache Kafka is just a high-level API over plain Apache Kafka Client, I don't see how any external stores may belong to this project...

@nageshs28
Copy link
Author

nageshs28 commented Feb 7, 2023

Thanks @garyrussell for quick revert. I wanted to know your opinions on feasibility with spring-kafka. Let me explore on suggestions provided and perform poc. Also went through below doc for reference.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants