Saturday, June 25, 2016

ActiveMQ Tips

How to change the default port of Active MQ ?

1. Go to activemq.xml ($ActiveMQ_Home/conf/)

2. Edit openwire port

<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors>

By default, 61616 is port of Active MQ. You can give whatever the port you want.


Login to Active MQ dashboard 

In Active MQ, there is a web dashboard which will display every detail of topics/queues created within active mq broker. You can access to that using following url (using any browser)
  • http://<ip>: 8161
          Ex: http://localhost:8161/


Default username and password for Active MQ
  • When accessing active MQ you may not need any password unless you add it through the installation process.
  • When you login to web console (even though you did not add any password/ username), you will have to provide username and password. 
  • Use username: admin and password: admin

General JMS parameter values for Active MQ
  • java.naming.factory.initial : org.apache.activemq.jndi.ActiveMQInitialContextFactory
  • java.naming.provider.url : tcp://localhost:61616  (Note: if you are calling remote active mq broker, you should add relevant ip/host name instead of "localhost")

 Integration with WS02 ESB

  •  If you are going to configure Active MQ with WSO2 ESB, you can refer WSO2 documentations.
  • But you have to remember about the version of client jars you are going to put into ESB. Even though you are using active MQ which has higher version than 5.8, you have to put Active MQ 5.8 client jars
Client Libraries:
  • activemq-broker-5.8.0.jar
  • activemq-client-5.8.0.jar
  • geronimo-jms_1.1_spec-1.1.1.jar
  • geronimo-j2ee-management_1.1_spec-1.0.1.jar

Welcome all value additions regarding Active MQ :) 



No comments:

Post a Comment