[
https://issues.apache.org/jira/browse/ARTEMIS-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17612841#comment-17612841
]
Justin Bertram commented on ARTEMIS-4027:
-----------------------------------------
bq. In general...Death by 1000 papercuts
I think all the things you mentioned are legitimate annoyances, and I would
_love_ to see you apply your time & energy on improving the broker's web
console instead of writing your own. That way the entire community will benefit
from your work, and you will get the benefit of using a console for which you
are not the only developer.
In my opinion, this is one of the most beautiful things about Open Source. When
folks participate, we all win.
bq. Is Jalokia is the only way I know how to get the data...is there another
way?
The management model used by the broker is based on JMX, but there are several
ways to access/use the underlying model.
Jolokia is a JMX-HTTP bridge, but you could skip HTTP and connect directly to
the JMX server if you wanted. [Here's an
example|https://github.com/apache/activemq-artemis/tree/main/examples/features/standard/jmx]
using Java.
You could also use "management messages" which is what the Artemis CLI uses.
These are just specially crafted messages which a client can send in a
request/response pattern to execute management operations, get metrics, etc.
The messages can be used via core, AMQP, OpenWire, & STOMP. MQTT 5 might also
work, but I don't think MQTT 3.x would work since it doesn't support any kind
of message properties. [Here's an
example|https://github.com/apache/activemq-artemis/tree/main/examples/features/standard/management]
using JMS.
> Cannot access management API due to CORS problems (403)
> -------------------------------------------------------
>
> Key: ARTEMIS-4027
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4027
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: API
> Affects Versions: 2.25.0
> Reporter: daves
> Priority: Major
> Attachments: artemis.log, consoleError.JPG, etc.zip, f1.JPG, f2.JPG,
> options.JPG
>
>
> I try to access the management API from a client app running in chrome.
> This does not work because the preflight check fails.
> OPTIONS request:
>
> {code:java}
> fetch("http://localhost:8161/console/jolokia/?maxDepth=7&maxCollectionSize=50000&ignoreErrors=false&canonicalNaming=false",
> {
> "headers": {
> "accept": "*/*",
> "accept-language": "en-US,en;q=0.9",
> "sec-fetch-dest": "empty",
> "sec-fetch-mode": "cors",
> "sec-fetch-site": "cross-site"
> },
> "referrerPolicy": "strict-origin-when-cross-origin",
> "body": null,
> "method": "OPTIONS",
> "mode": "cors",
> "credentials": "omit"
> });
>
> {code}
>
> The request fails with a 403 not authenticated... which is strange since
> preflight checks must not be authenticated.
> !options.JPG!
>
> I tried to configure CORS in the jolokia-access.xml file like so:
>
>
> {code:java}
> <restrict>
> <cors>
> <!-- Allow cross origin access from localhost ... -->
> <allow-origin>*://*</allow-origin>
> <!-- Options from this point on are auto-generated by Create.java from
> the Artemis CLI -->
> <!-- Check for the proper origin on the server side, too -->
> <strict-checking />
> </cors> </restrict>{code}
>
>
> I also tried to specify the URL and port of my application explicitly. But
> this did not work either.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)