[
https://issues.apache.org/jira/browse/ARTEMIS-5737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18034869#comment-18034869
]
Gašper Čefarin commented on ARTEMIS-5737:
-----------------------------------------
I made a PR to hawtio which would allow me to only query jolokia for these
attributes, instead for all attributes - the resulting calls would be much
smaller and faster.
As written in the hawtio PR, for ~1000 queues the processing time drops down
from 8ms to 1ms, and from 20kb to less than 1kb.
[https://github.com/hawtio/hawtio-next/pull/1777]
This is how the getBrokerInfo() would look like then:
{code:java}
async getBrokerInfo(): Promise<BrokerInfo | null> {
const jolokiaAttributes = [
"Name", // brokerInfo.name
"NodeID", // brokerInfo.nodeID
"Version", // brokerInfo.version
"Started", // brokerInfo.started
"Uptime", // brokerInfo.uptime
"GlobalMaxSize",// used to compute globalMaxSizeMB
"AddressMemoryUsage", // used to compute addressMemoryUsageMB and
used
"HAPolicy" // brokerInfo.haPolicy
];
return new Promise<BrokerInfo | null>(async (resolve, reject) => {
const response = await
jolokiaService.readSpecifiedAttributes(brokerObjectName,
jolokiaAttributes).catch(e => null);{code}
> Duplicated jolokia calls on web console's status page
> -----------------------------------------------------
>
> Key: ARTEMIS-5737
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5737
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Web Console
> Affects Versions: console-1.3.0
> Reporter: Gašper Čefarin
> Priority: Major
> Attachments: artemis new.png, artemis old-1.png,
> image-2025-11-02-13-38-00-089.png
>
>
> PR here: https://github.com/apache/activemq-artemis-console/pull/130
> This could be part of the problem reported by Herbert Helmstreit (WebConsole
> on broker with many queues) on mailing list.
> Current implementation makes 27 jolokia calls on status page, while the new
> one makes only 10:
> old - 96.21kb: !artemis old-1.png|width=1752,height=643!
> new - 41.05kb: !artemis new.png|width=1757,height=392!
> I also checked what's happening here:
> {code:java}
> const timer = setInterval(getBrokerInfo, 5000)
> return () => clearInterval(timer){code}
> getBrokerInfo calls artemisService.getBrokerInfo(), which fetches stuff like
> Version, HAPolicy, mem usage, uptime ... this was the call with the biggest
> payload in my case.
> This also fetches all the queue and address names as well, which is not
> needed to update the status page, creating unnecessary load every 5 seconds
> on both the client and the broker:
> !image-2025-11-02-13-38-00-089.png!
> There's another thing to consider:
> If I understand this correctly, the code executes every 5 seconds and so if
> getBrokerInfo does not finish in under 5 seconds, the calls begin to stack ...
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact