-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][broker]Increase the number of delayed messages sent whose delay time exceeds the TTL statistical metric #25010
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
base: master
Are you sure you want to change the base?
Changes from 8 commits
1cfa3c4
29ccb03
4148cc4
9f38653
c7a0fe7
9de09ab
506a84d
89c645e
b1afd8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,6 +186,9 @@ public class TopicStatsImpl implements TopicStats { | |
| /** The last publish timestamp in epoch milliseconds. */ | ||
| public long lastPublishTimeStamp; | ||
|
|
||
| /** The number of delay messages that exceed TTL delay. */ | ||
| public long exceedTTLDelayedMessages; | ||
|
Comment on lines
+189
to
+190
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similar comment about |
||
|
|
||
| public List<? extends PublisherStats> getPublishers() { | ||
| return Stream.concat(publishers.stream().sorted( | ||
| Comparator.comparing(PublisherStatsImpl::getProducerName, nullsLast(naturalOrder()))), | ||
|
|
@@ -264,6 +267,7 @@ public void reset() { | |
| this.oldestBacklogMessageSubscriptionName = null; | ||
| this.topicCreationTimeStamp = 0; | ||
| this.lastPublishTimeStamp = 0; | ||
| this.exceedTTLDelayedMessages = 0; | ||
| } | ||
|
|
||
| // if the stats are added for the 1st time, we will need to make a copy of these stats and add it to the current | ||
|
|
@@ -295,6 +299,7 @@ public TopicStatsImpl add(TopicStats ts) { | |
| this.committedTxnCount = stats.committedTxnCount; | ||
| this.backlogQuotaLimitTime = stats.backlogQuotaLimitTime; | ||
| this.backlogQuotaLimitSize = stats.backlogQuotaLimitSize; | ||
| this.exceedTTLDelayedMessages += stats.exceedTTLDelayedMessages; | ||
| if (stats.oldestBacklogMessageAgeSeconds > this.oldestBacklogMessageAgeSeconds) { | ||
| this.oldestBacklogMessageAgeSeconds = stats.oldestBacklogMessageAgeSeconds; | ||
| this.oldestBacklogMessageSubscriptionName = stats.oldestBacklogMessageSubscriptionName; | ||
|
|
||
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.
exceedTTLDelayedMessagedoesn't read well. It seems thatttlExceededDelayedMessagesRatewould be more accurate for this field.In addition, it would be necessary to add a comment to this field to explain it.