question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQ] EventProcessorClientBuilder should accept .initialPartitionEventPosition(java.util.function.Function<String, EventPosition>)

See original GitHub issue

Is your feature request related to a problem? Please describe. Allow to provide a lambda function to set .initialPartitionEventPosition(java.util.function.Function<String, EventPosition>) when building EventProcessorClient.

Describe the solution you’d like Currently to build EventProcessorClient (using EventProcessorClientBuilder) we can set .initialPartitionEventPosition() and pass a java.util.Map<String, EventPosition> which helps in deciding from where to start consuming events in each partition. This is more flexible, in the case when we want to start reading from different points from different partitions. But there is also a use case where users might want to start reading from the same point from each partition.

  • In the ideal case, when events are published in a round robin fashion to EventHub (which is also the recommended way), it’ll also be very common to also start reading from the same position from each of the partition of that EventHub.

  • In the current scenario, to build that Map, application has to know the number of partitions the EventHub has. Even if there are multiple consumers, each application will have to build the map considering all the partitions and use it. Allowing users to simply provide a lambda simplifies this a lot because we can just use:

    .initialPartitionEventPosition((unused) -> EventPosition.earliest())
    

and not care about the number of paritions, the EventHub might have.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Description Added
  • Expected solution specified

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
srnagarcommented, Sep 21, 2020

@shubhambhattar Thanks for requesting this feature. We will look into the feasibility of supporting this feature and update the ticket when we have a plan.

1reaction
Petermarcucommented, Jul 29, 2020

Thanks for the feature request!

Read more comments on GitHub >

github_iconTop Results From Across the Web

EventProcessorClientBuilder Class - Microsoft Learn
Sets whether or not the event processor should request information on the last enqueued event on its associated partition, and track that information...
Read more >
Uses of Class com.azure.messaging.eventhubs ... - NET
Sets the credential information given a connection string to the Event Hubs namespace and name to a specific Event Hub instance. EventProcessorClientBuilder ......
Read more >
EventProcessorClientBuilder (Azure SDK for Java ... - javadoc.io
This class provides a fluent builder API to help aid the configuration and instantiation of the EventProcessorClient . Calling EventProcessorClientBuilder.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found