-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Implement PartitionManager methods #4538
[Event Hubs] Implement PartitionManager methods #4538
Conversation
Co-Authored-By: Ramya Rao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor nits
} | ||
|
||
// @public | ||
export enum CloseReason { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something all languages are exposing? I don't remember seeing it in our API design, that close()
takes a reason. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed API for javascript, here it takes CloseReason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@conniey We brought that up on Monday too, because we were curious how Java would know why the subscription was closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I also wonder what the user could do differently with that reason (ie. user shutdown vs stolen)? I mean, we log it in the EventConsumer but it is not propagated out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory if it was a shutdown they could checkpoint one last time, whereas if it were stolen they wouldn’t be able to update the checkpoint.
One of the required parameters to the EventProcessor constructor is partitionManager.
PartitionManager is an interface that describes 3 methods. Created a class called
InMemoryPartitionManager
which implementsPartitionManager
methods. InternallyInMemoryPartitionManager
class maintains a map to store partitionOwnerships.