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

[Event Hubs] Buffered Producer Await Handlers #27173

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

jsquire
Copy link
Member

@jsquire jsquire commented Feb 23, 2022

Summary

The focus of these changes is to shift the invocation of event handlers for the EventHubBufferedProducerClient from a non-deterministic background approach to one that is deterministic and in consistent order.

Feedback from beta customers has indicated that the "random" nature of handler invocations made it difficult to "checkpoint" with the source of events to mark them as complete. Handlers were potentially invoked in a different order than the batches were sent, and the handler was unable to pause publishing for a partition to accommodate completing a "checkpoint" operation.

Originally, the goal for background invocation was to ensure that handlers which were long-running or performed a heavy workload could not impact publishing throughput, but this also created additional pressure on the thread pool due to the unconstrained use of Task.Run to ensure that handlers written with synchronous code did not execute synchronously.

@jsquire jsquire added Event Hubs Client This issue points to a problem in the data-plane of the library. labels Feb 23, 2022
@jsquire jsquire added this to the [2022] March milestone Feb 23, 2022
@jsquire jsquire self-assigned this Feb 23, 2022
The focus of these changes is to shift the invocation of event handlers
for the `EventHubBufferedProducerClient` from a non-deterministic background
approach to one that is deterministic and in consistent order.

Feedback from beta customers has indicated that the "random" nature of handler
invocations made it difficult to "checkpoint" with the source of events to
mark them as complete.  Handlers were potentially invoked in a different order
than the batches were sent, and the handler was unable to pause publishing for
a partition to accommodate completing a "checkpoint" operation.

Originally, the goal for background invocation was to ensure that handlers
which were long-running or performed a heavy workload could not impact
publishing throughput, but this also created additional pressure on the
thread pool due to the unconstrained use of `Task.Run` to ensure that handlers
written with synchronous code did not execute synchronously.
@jsquire jsquire merged commit cf0803e into Azure:main Feb 24, 2022
@jsquire jsquire deleted the eventhubs/buffered-await branch February 24, 2022 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants