-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[stats] Add Key_Shared metadata to topic stats #11839
Conversation
@@ -103,6 +103,12 @@ | |||
/** Mark that the subscription state is kept in sync across different regions. */ | |||
public boolean isReplicated; | |||
|
|||
/** Whether out of order delivery is allowed on the Key_Shared subscription. */ | |||
public boolean allowOutOfOrderDelivery; |
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.
This should also be added to the SubscriptionStats
interface.
Also, since this is specific to KeyShared subscriptions, it might get confusing when using other subscription types. We could instead introduce a sub-interface/sub-object to show the key-shared policy.
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.
Also, since this is specific to KeyShared subscriptions, it might get confusing when using other subscription types. We could instead introduce a sub-interface/sub-object to show the key-shared policy.
Does that mean we should add the following two?
KeySharedSubscriptionStats
interface that extends theSubscriptionStats
interfaceKeySharedSubscriptionStatsImpl
class that extends theSubscriptionStatsImpl
class and implements theKeySharedSubscriptionStats
interface
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.
I actually added the above sub-interface/sub-class, but then the deserialization of the json response didn't seem to work on the pulsar-client-admin side. So I just added getters to the SubscriptionStats
interface.
@massakam thanks for adding docs! |
PTAL |
9c56629
to
ab36cfd
Compare
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.
+1
* Add Key_Shared metadata to topic stats * Add getters to SubscriptionStats * Resolve conflicts (cherry picked from commit 0180735)
* Add Key_Shared metadata to topic stats * Add getters to SubscriptionStats * Resolve conflicts
Motivation
Users can specify the Key_Shared subscription policy as follows:
However, these metadata are not currently included in the topic stats.
Modifications
Added the following two fields to the topic stats:
Verifying this change
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changes