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

[QUERY]Stick one EventHub consumer to read a specific partition from AEH using spring-messaging-azure-eventhubs SDK #722

Open
hpunjan1 opened this issue Sep 12, 2023 · 2 comments
Labels
azure-spring All azure-spring related issues azure-spring-eventhubs Spring event hubs related issues.

Comments

@hpunjan1
Copy link

Query/Question
How can we stick one EventHub consumer instance to read a specific partition from Azure EventHub with using the Spring Azure EventHub SK- spring-messaging-azure-eventhubs 4.1.0?
Our current codebase is based on this:

  • We have multiple instances of consumer process running reading from same EventHub with 10 partitions and 1 consumer group.
  • We checkpoint manually into separate storage account containers.
  • It is working fine but since we checkpoint for individual event hub partitions in separate container locations and our consumers can start/stop randomly, multiple consumers potentially read from older checkpoints and reload the same data, resulting in duplicates. Because of this issue, we want to stick each consumer to particular partition
  • We have 10 partitions on our event hub

Why is this not a Bug or a feature Request?
We are already using the Spring Azure EventHub SDK open-sourced by Microsoft. We only have a query related to the SDK usage.

Setup (please complete the following information if applicable):

  • OS: Linux
  • IDE: Eclipse
  • Library/Libraries: spring-messaging-azure-eventhubs version 4.1.0
@hpunjan1 hpunjan1 added the azure-spring All azure-spring related issues label Sep 12, 2023
@Netyyyy Netyyyy added the azure-spring-eventhubs Spring event hubs related issues. label Sep 13, 2023
@Netyyyy
Copy link
Contributor

Netyyyy commented Sep 13, 2023

Hi @hpunjan1 , thanks for reaching out.
spring-messaging-azure-eventhubs using EventProcessorClient, which is self-balancing, does not support sticking to a particular partition.

@hpunjan1
Copy link
Author

hpunjan1 commented Sep 13, 2023

Hi,
Thanks for your reply.

What flavor of Spring integration would support BOTH?

  • specifying a particular partition per consumer
  • specifying a particular offset to read from that partition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues azure-spring-eventhubs Spring event hubs related issues.
Projects
None yet
Development

No branches or pull requests

2 participants