Connecting ActiveMQ Web-Console to an existing broker (instead of starting a new one)
Asked Answered
M

1

7

Having deployed the activemq-web-console war into a Tomcat embedded application how can one make it connect to an existing broker rather than create a new one?

The war comes with a set of predefined configurations, in particular, the WEB-INF/activemq.xml contains a configuration for the BrokerService

<broker brokerName="web-console" useJmx="true" xmlns="http://activemq.apache.org/schema/core">
  <persistenceAdapter><kahaDB directory="target/kahadb"/></persistenceAdapter>

  <transportConnectors>
    <transportConnector uri="tcp://localhost:12345"/>
  </transportConnectors>
</broker>

used from webconsole-embedded.xml in the following manner:

<bean id="brokerService" class="org.apache.activemq.xbean.BrokerFactoryBean">
  <property name="config" value="/WEB-INF/activemq.xml"/>
</bean>

This configuration creates a new instance of BrokerService and tries to start the broker.

It is reported that the web console can be used to monitor an existing broker service rather than creating a new one. For this one should set the following properties somewhere:

webconsole.type=properties
webconsole.jms.url=tcp://localhost:61616
webconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-trun

The questions is, where does one have to set these properties within the Tomcat embedded app and which XML changes in the above have to be performed for them to be used. I cannot find any sensible explanation how to configure it, and a BrokerService instance seems to be required by the remaining spring config.

Any ideas?

Please do not suggest to use hawtio instead!

Modestine answered 9/1, 2018 at 9:22 Comment(3)
Having the same question now, did you ever find a solution?Urissa
Good question. Yes we found some solution or a workaround, but I left the company since then and do not recall what it was.Modestine
You were my last hope :'(Urissa
P
1

I had the same problem today. You can start the webconsole in "properties" mode which gives you the oppertunity to connect over jmx.

I added following java arguments to our Jboss 6.1 and it worked immediatley. I didn't change any of the xmls (works out of the box)...

Example:

-Dwebconsole.type=properties -Dwebconsole.jms.url=tcp://<hostname>:61616 -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://<hostname>:1090/jmxrmi -Dwebconsole.jmx.user=admin -Dwebconsole.jmx.password=123456 

Also discussed here: https://svn.apache.org/repos/infra/websites/production/activemq/content/5.7.0/web-console.html

Paramagnetism answered 19/11, 2019 at 22:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.