Apache ActiveMQ 5.9: One of the Strongest ActiveMQ Releases
Join the DZone community and get the full member experience.Join For Free
The Apache ActiveMQ team has just released ActiveMQ 5.9.
|Apache ActiveMQ 5.9 released|
In this release, we have hardened the broker and added new protocols such as AMQP and MQTT. We've also hardened the LevelDB persistent store, which now includes a new replication functionality.
Over time, we plan to make LevelDB the default persistent store out-of-box, replacing the current KahaDB store. But that will come in a future release.
Another extremely helpful new feature is the ability to do runtime configuration changes to the broker without having to restart the broker. You cannot change everything without a restart just yet, but you can, for example, update network connectors when you have clustered brokers, etc. The new documentation will show you which things can be updated without a restart.
For the Camel users, there is a new broker component that allows lighter inter-broker routing. Rob Davies has previously blogged about this and provides an interesting use case that uses Camel routing logic to decide if a message should go into one queue or to another depending on the current queue depth.
Last but not least, Apache ActiveMQ now ships with Hawt.io as its new web console out of the box. The old web console is still there, but it is considered deprecated.
We also cleaned up in the conf directory, moving all the example configurations into examples/conf.
Apache ActiveMQ 5.9 release notes are here.
Starting Apache ActiveMQTo try out Apache ActiveMQ you go to the activemq.apache.org web site and click the download link. Then you can download a zip or tgz file of the distribution. Then you unzip/untar the file and then you can start the broker from the command line as shown below:
davsclaus:/opt$ tar xf ~/Downloads/apache-activemq-5.9.0-bin.tar.gz davsclaus:/opt$ cd apache-activemq-5.9.0/ davsclaus:/opt/apache-activemq-5.9.0$ bin/activemq consoleWhen the broker is staring up it now logs all the transport connectors it provides and their urls.
From the logs below we can see that ...
INFO | Listening for connections at: tcp://davsclaus.air:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector openwire started INFO | Listening for connections at: amqp://davsclaus.air:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector amqp started INFO | Listening for connections at: stomp://davsclaus.air:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector stomp started INFO | Listening for connections at: mqtt://davsclaus.air:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector mqtt started INFO | Listening for connections at ws://davsclaus.air:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector ws startedwe have the following transport connections enabled
- openwire - is the JMS protocol
- amqp - AMQP 1.0
- stomp - is a very simple text based protocol that you can use from telnet
- mqtt - for machine to machine communication
- ws - WebSocket (stomp or mqtt)
Telnet to the BrokerFor example, with STOMP we can connect to the broker using telnet, and type in the telnet shell STOMP commands to connect and then send and receive messages. To connect I can type
telnet localhost 61613 CONNECT login:foo passcode:bar ^@And the broker will respond with:
CONNECTED heart-beat:0,0 session:ID:davsclaus.air-61798-1382433481104-2:1 server:ActiveMQ/5.9.0 version:1.0And I can then disconnect with:
DISCONNECT ^@ Connection closed by foreign host.There is a user guide here how to use telnet with stomp.
Accessing the Web ConsoleWhen the ActiveMQ broker starts up, it logs the URL for the web console(s)
INFO | ActiveMQ WebConsole available at http://localhost:8161/
So just open a broker on that link. When you access the console, it's secured, so you need to login. The broker comes with a default user and password, which you can see in the conf/users.properties file.
There is also a docs/WebConsole-README.txt file that provides more details about the web consoles, and how you can turn on/off login.
With the Hawt.io web console, we can create queues and send messages to the queues. In the screenshot below I have created two queues: beer and wine, and I've told it to send a message to the beer.
|Hawt.io web console - Comes out of the box in the new Apache ActiveMQ 5.9 release.|
Trying the ActiveMQ Web ExamplesApache ActiveMQ comes with a few web examples you can try by starting the broker like so:
bin/activemq console xbean:examples/conf/activemq-demo.xmlTry the examples, then open the web browser at http://localhost:8161/ and click on the last link. You should also try clicking on the web console link (Hawt.io) because the web console now shows the Camel plugin as one of the examples using Camel.
Hope this release gives you a lot more power in what you can do with your applications!
Apache ActiveMQ Release (agency) Console (video game CLI)
Opinions expressed by DZone contributors are their own.