Skip to content

ARTEMIS-5607 Support disabling JMX notifications#6278

Merged
clebertsuconic merged 1 commit intoapache:mainfrom
hyperxpro:ARTEMIS-5607
Mar 12, 2026
Merged

ARTEMIS-5607 Support disabling JMX notifications#6278
clebertsuconic merged 1 commit intoapache:mainfrom
hyperxpro:ARTEMIS-5607

Conversation

@hyperxpro
Copy link
Contributor

Motivation:

JMX notifications are rarely used these days yet the broker still mirrors all management notifications as JMX notifications. This is unnecessary overhead in most circumstances so we should allow users to disable them.

Modification:

Added a new jmx-notification-enabled boolean configuration property (default true) to allow users to disable the mirroring of management notifications as JMX notifications. When set to false, the NotificationBroadcasterSupport in ManagementServiceImpl is not instantiated, and all JMX notification methods in ActiveMQServerControlImpl short-circuit, eliminating the overhead.

Result:
Fixes ARTEMIS-5607

@hyperxpro hyperxpro changed the title Support disabling JMX notifications ARTEMIS-5607 Support disabling JMX notifications Mar 6, 2026
@clebertsuconic
Copy link
Contributor

  • this needs a JIRA
  • I'm not sure I like the name of the property on the configuration.. although I'm terrible with names.. I would prefer a name that doesn't not include "enabled" in the property name.

@jbertram
Copy link
Contributor

@hyperxpro, this looks good overall. Nice work! That said, there are a few items that need attention:

  1. The commit message should reference the Jira. See here.
  2. There is no test that verifies the behavior. I think even a simple unit test that verifies broadcast is null or not when creating an instance of ManagementServiceImpl would be sufficient.
  3. I realize now that using the term "mirrors" in Jira description was a mistake because we already have a mirroring feature in the broker and this may cause confusion. You've used this term throughout the JavaDoc and commit message. I think using something like "reproduces" (and variants) would be more clear.

@jbertram
Copy link
Contributor

jbertram commented Mar 11, 2026

Regarding the name jmx-notification-enabled, this is consistent with the naming convention used for other settings (e.g. jmx-management-enabled, persistence-enabled, message-counter-enabled, etc.). Therefore, I don't have a problem with the name. In fact, I think it makes more sense to be consistent here rather than use a different convention.

@clebertsuconic
Copy link
Contributor

clebertsuconic commented Mar 12, 2026

I guess the only thing missing is the commit with the JIRA id? and a test?

@hyperxpro let me know if you can do? if you can't just let me know and I will do it.

for the JIRA ID you amended the title of the PR, but not the git commit itself. You will need to amend it.

@clebertsuconic
Copy link
Contributor

@hyperxpro please type the following before you make any further changes:

git pull --rebase ARTEMIS-5607

I amended the commit on your branch (It's a feature on github that I can change branch)

@hyperxpro
Copy link
Contributor Author

@clebertsuconic @jbertram PTAL, aligned everything as requested. :)

@clebertsuconic
Copy link
Contributor

I will run my private CI with the complete testsuite. and if everything is good I will merge this.

thank you.

@clebertsuconic
Copy link
Contributor

I added an additional commit to your branch (a test on broker properties).

@clebertsuconic clebertsuconic merged commit 3a5731c into apache:main Mar 12, 2026
@clebertsuconic
Copy link
Contributor

I will add this to releases.adoc

@clebertsuconic
Copy link
Contributor

I meant versions.adoc

@clebertsuconic
Copy link
Contributor

@hyperxpro thank you so much for this contribution.

@hyperxpro hyperxpro deleted the ARTEMIS-5607 branch March 13, 2026 20:59
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