How to enable ActiveMQ in Servicemix

Out of the box, every ServiceMix instance comes with an embedded ActiveMQ JMS (Java Message Service) broker. This feature makes it easy to communicate between Camel routes using persistent messages and also to distribute messages over multiple instances using clustering or load balancing.

The ActiveMQ Web Console feature is included in any ActiveMQ distribution and you'll probably want to have it installed in ServiceMix as well to make sure you can monitor your JMS broker.

So, the first thing you have to do is to install the war feature running the following command:

karaf@root> features:install war


Then you can do run the following command to install the ActiveMQ Web Console:


karaf@root> features:install activemq-web-console


This command will install and start the web console automatically with an embedded broker which you can access going to the following URL: http://localhost:8181/activemqweb


But that brings the first issue... Once you have the default embedded ActiveMQ broker running then the Web Console will fail to start since it also tries to start an instance of the ActiveMQ basically on the same port number. It's quite frustrating to install a feature on ServiceMix and not be able to test it or execute it right away.

So, to configure the ActiveMQ Web Console to connect to the default embedded broker you have to do a little extra configuration change but that should be straightforward.

Go to $SMX_HOME/etc and edit the system.properties file then add the following details:


webconsole.type=properties
webconsole.jms.url=tcp://localhost:61616
webconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
webconsole.jmx.user=smx
webconsole.jmx.password=smx


Save it and (re)start ServiceMix. That should be enough to get the ActiveMQ Web Console connected to the default embedded broker in ServiceMix.

If you don't want to monitor the default embedded broker but want to stick with the instance that the Web Console starts for you then all you will have to do is to uninstall the default embedded ActiveMQ broker with the following command:


karaf@root> features:uninstall activemq-broker


and then restart ServiceMix. This way there will be no conflicts on the ActiveMQ port number anymore.

The downloaded bundles in servicemix are stored in apache-servicemix-5.1.0\data\cache.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值