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

[AMQ-8463] Add advancedMessageStatistics feature #1329

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

mattrpav
Copy link
Contributor

@mattrpav mattrpav commented Oct 23, 2024

Reviewer notes:

  • New AdvancedMessageStatisticsEnabled flag per-policyEntry (default: false)
  • No new timestamp sampling added (ie no new System.currentTimeMillis() calls)
  • Values reset on resetStatistics
  • Values exposed via JMX
  • Enqueue Message BrokerInTime, ClientID, MessageID and MessageTimestamp fields
  • Dequeue Message BrokerInTime, BrokerOutTime, ClientID, MessageID and MessageTimestamp fields
  • Unit test for policyEntry runtime configuration modification
  • Unit test for functional testing including network include/exclude verification
  • Non-durable topics do not have brokerInTime or messageTimestamp in scope during dequeue, so those values will always be zero (0)
  • Convert to using generics for UnsampledStatistic
  • Add unit test for UnsampledStatisticImpl (done: 98.3% coverage)

advanced-message-statistics

@mattrpav mattrpav self-assigned this Oct 23, 2024
@mattrpav mattrpav force-pushed the AMQ-8463 branch 4 times, most recently from a25b984 to dabeb33 Compare October 25, 2024 16:46
@mattrpav mattrpav marked this pull request as ready for review October 25, 2024 17:04
@mattrpav mattrpav changed the title WIP: [AMQ-8463] Add advancedMessageStatistics feature [AMQ-8463] Add advancedMessageStatistics feature Oct 25, 2024
Copy link
Contributor

@cshannon cshannon left a comment

Choose a reason for hiding this comment

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

One thing I noticed is the new statistic impl classes all are copy and pasted code, it seems like you could just re-use all of that if you used generics.

@cshannon
Copy link
Contributor

I know this would be a much bigger effort but if we intend to keep adding more and more metrics, from a performance and maintainability standpoint, we should really look into moving everything to Micrometer which adds more more flexibility and should be better performance. That kind of change would likely end up being a major version, ie AMQ 7.0 if we wanted to do that.

@mattrpav mattrpav force-pushed the AMQ-8463 branch 3 times, most recently from df08462 to c461626 Compare December 13, 2024 18:13
@mattrpav
Copy link
Contributor Author

mattrpav commented Dec 13, 2024

Local performance testing showed no degradation in performance

64x producers sending in async to a single topic sent 1M messages ea in ~24s on a 2023 14" Apple M3 Pro (2.6M messages/sec)

@cshannon
Copy link
Contributor

@mattrpav - I opened up a PR to this branch to fix a few things but I noted that I think StatisticImpl has some issues right now with the changes (mostly due to the fact that so many classes inherit from it) mattrpav#1

Copy link
Contributor

@cshannon cshannon left a comment

Choose a reason for hiding this comment

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

made a few comments to look at but for the most part it LGTM

@mattrpav mattrpav merged commit ca7eaeb into apache:main Jan 22, 2025
1 check passed
@mattrpav mattrpav deleted the AMQ-8463 branch January 22, 2025 14:56
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.

3 participants