How do I connect the Web Console to an Spring Boot embedded Artemis Server ?
I have mostly followed this Answer.
- tomcat 9.0.58
activemq-web-console-5.16.3.war
inwebapps
folder- added
jakarta.servlet.jsp.jstl-1.2.6.jar
&jakarta.servlet.jsp.jstl-api-1.2.7.jar
intowebapps/activemq-web-console-5.16.3/WEB-INF/lib
, otherwise the console would not start - added the line
set "JAVA_OPTS=%JAVA_OPTS% -Dwebconsole.type=properties -Dwebconsole.jms.url=tcp://localhost:61616 -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
incatalina.bat
But now when I access the webconsole - ERROR:
- I get
Exception occurred while processing this request, check the log for more information!
- and the logs say:
IllegalStateException: No broker is found at any of the 1 configured urls
My Artemis Server is running in a minimalistic Spring Boot App:
- started with VMOptions:
-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.rmi.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
- spring boot parent:
spring-boot-starter-parent:2.6.2
- active mq:
artemis-jms-server:2.19.0
spring-boot-starter-web:2.6.2
- and the following configuration class:
@Configuration
public class ArtemisConfig implements ArtemisConfigurationCustomizer {
@Autowired
private ArtemisProperties artemisProperties;
@Override
public void customize(org.apache.activemq.artemis.core.config.Configuration configuration) {
try{
configuration.setJMXManagementEnabled(true);
configuration.setSecurityEnabled(false);
configuration.addAcceptorConfiguration("netty", "tcp://localhost:" + artemisProperties.getPort());
} catch (Exception e) {
throw new RuntimeException("queue did not start");
}
}
}