Introduction
In my previous ActiveMQ introduction, I have explained the installation process, how to check what ports are used by ActiveMQ, and how to enable JMX. In this post, I am going to further explain the ports used by ActiveMQ. However the main purpose of this post to explain how to run the examples coming with ActiveMQ. This technique is important for the future discuss on how to set up high availability features with ActiveMQ, so that we can verify the configuration.
In the coming few posts, I will explain the enterprise messaging configuration for high availability with:
- Master-Slave HA with Share File System
- Use Tomcat Web Container to Host ActiveMQ Web Console
- Bridging the Network Broker
- Network Brokers
- Best Practices
In the future posts, I will explain java programming techniques for writing producer and consumers for java developers, as well as advanced programing for enterprise integration using Apache Camel and ActiveMQ. Thus, we will study these examples in detail.
HTTNow first lets discuss a bit the transport connectors come with the default configuration in activemq.xml
Default Ports Used By ActiveMQ
Take a look at activemq.xml, you will find this xml segment:
All these protocols can be found at activemq.apache.org website. ActiveMQ support many other transport connectors, such as VM, SSL, NIO, NIO+SSL, HTTP, HTTPS, etc. The details can be found at http://activemq.apache.org/configuring-version-5-transports.html
Run ActiveMQ Examples
ActiveMQ comes with many examples. For easy testing, we can run the examples at examples/openwire/swissarmy. Under the dir, there is a readme file. Typically, we will use the following lines for the producer and consumers:
ant consumer -Durl=tcp://localhost:61616 -Dtopic=true -Ddurable=true -Dmax=5000 ant producer -Durl=tcp://localhost:61616 -Dtopic=true -DtimeToLive=30000 -Dmax=5000
Make sure ant is installed and the ANT_HOME and PATH are set properly. In the following post about ActiveMQ High Available Configuration with Master-Slave, I will cover more about how to run these examples.
No comments:
Post a Comment