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

[EventHub.V5] Fix concurrent process event bug #1972

Merged

Conversation

Arkatufus
Copy link
Contributor

Fixes #1971

Changes

  • Make sure that the EventHub source can handle concurrent ProcessEventAsync calls

Copy link
Contributor Author

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

Comment on lines +93 to +94
var holder = new Holder(context);
_pendingQueue.Enqueue(holder);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix, on multi partition EventHub, ProcessEventAsync is called concurrently for every PartitionId in the ProcessorClient. The old code assumes that the processor will wait for every async call, now we buffer all async calls and completes each task when the event is successfully pushed down the stream.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit 33292c2 into akkadotnet:dev Sep 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akka Streams Event Hub Source fails to read from multiple partitions reliably
2 participants