I am using ActiveMQ 5.3.2 and 5.6.0. In ActiveMQ 5.3.2, the default settings for JMX is
SUNJMX="-Dcom.sun.management.jmxremote"
In ActiveMQ 5.6.0, the default settings for JMX is
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"
So, these settings have no port definition. Could you tell me ActiveMQ is really starting JMX connection with these settings? If so, what is the default port to connect as I cannot connect to 1099. If port is randomly selected, how to find the port which ActiveMQ is using?
Thanks.
Default port is 1099. This can be override by passing jmx parameters as argument to activeMQ in activeMQ start script(activemq.bat or .sh file) . Use property
Dcom.sun.management.jmxremote.port for setting JMX port
if you run ActiveMQ Broker in a Spring Boot, this is a simple way to configure the JMX port to the value 11099:
BrokerService broker = new BrokerService();
broker.getManagementContext().setConnectorPort(11099);
broker.getSystemUsage().getStoreUsage().setLimit(100_000_000L);
broker.getSystemUsage().getTempUsage().setLimit(100_000_000L);
TransportConnector connector = new TransportConnector();
connector.setUri(new URI("tcp://localhost:61616?wireFormat.maxInactivityDuration=3000000&wireFormat.maxInactivityDurationInitalDelay=1000000"));
broker.addConnector(connector);
broker.start();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With