What Happened to HornetQ, the JMS That Shattered Records?
Join the DZone community and get the full member experience.Join For Free
HornetQ 2.0 broke records and defeated top-ranked messaging services in benchmark tests. Why wasn't it widely adopted?
Software vendors make all kinds of claims about their products, but what developers care about is proof. When testing a new product, it's important to see how it stacks up against its competition.
For years, researchers at UT Darmstadt have compared the performance of message-oriented middleware servers based on Java Messaging Service (JMS). In 2010, the SPECjms2007 benchmark record was smashed by HornetQ, an open-source enterprise messaging system from JBoss.
At the time, SPECjms2007 was the industry-standard benchmark for JMS systems. While the benchmark has since been retired, it provided a framework for detailed performance analysis as well as workload and performance metrics for the products being analyzed.
The framework considered all components that were a part of the application environment, including hardware, JMS server software, JVM software, database software if used for message persistence, and the system network. It used horizontal and vertical topologies as scalability networks.
During the test, HornetQ 2.0 was directly compared to Apache ActiveMQ 5.3, another JMS system that was known for its speed at the time. To ensure consistency, both messaging systems were tested on an IBM x3850 system utilizing identical OS setups.
Not only did HornetQ completely decimate the records set by ActiveMQ, but it managed to smash all SPECjms2007 benchmarks at the time. While HornetQ 2.0 didn't have the reputation of ActiveMQ, it had proven that it was faster than every other message broker on the scene. In fact, HornetQ 2.0's scores were a staggering 307% higher than any previous results published by SPECjms2007.
Shortly after the tests, DZone interviewed Tim Fox, who was HornetQ's project lead. During the interview, he discussed the main factors that contributed to HornetQ's impressive performance.
HornetQ utilized Netty, a low‑level Java NIO library written by the author of Apache MINA. The JMS system also had a secret weapon, which Fox explained:
"This system is a very high‑performance journal, which is basically written in 99‑percent Java. But we also have a small layer of native code that's accessed by JNI. And what this does is, when you're running on Linux, it detects that you're running on Linux, and then it automatically enables a bit of native code, which allows us to pass into Linux asynchronous file IO. And basically, what this does is it allows us to get much faster persistence than would be possible in pure Java."
After HornetQ's record-smashing benchmark test, the messaging system released several updates. Later that year, HornetQ released its 2.1.0 update, which refined the original release. It was followed up by several more updates added new features, like Vert.x integration, and strove to improve upon the original JMS system.
Competition is a vital aspect of innovation, and when HornetQ broke records, it brought plenty of new competitors to the scene. These competitors included RabbitMQ, a messaging broker written in Erlang, and SonicMQ, a message queuing system that's now known as Aurea Messenger.
In spite of HornetQ's incredible speed, however, it failed to surpass its biggest competitor. Near the end of 2014, the codebase for HornetQ was donated to the Apache ActiveMQ community. Today, it exists as an Active MQ subproject called Artemis.
At one point in time, HornetQ was faster than any other available enterprise messaging system. It offered a full enterprise feature set that could easily stand side-by-side against ActiveMQ and even offered some features that ActiveMQ was lacking. Since HornetQ was not built around JMS, it was also protocoled agnostic, which was another major advantage
People that used HornetQ had plenty of praise for its features. Its management API made it easy to work with, and its NIO optimizations were appealing to many users. HornetQ also had detailed documentation, making it easy for users to learn what they needed to know.
It’s clear that HornetQ 2.0 had many advantages, so why did it fail to find a wide audience? It's possible that the JMS struggled because ActiveMQ was already widely adopted at the time of its release. ActiveMQ fell short of Hornet 2.0 in those benchmark tests, but it still had a high adoption rate and name recognition.
Even though HornetQ got plenty of attention when it broke benchmark records, future updates didn’t receive the same level of coverage. Because of this, many potential users may not have been aware of the new features that HornetQ added.
Many people were drawn to ActiveMQ because of its reputation as a stable messaging system. Users were unwilling to take risks on a lesser-known system like HornetQ and continued to stick with ActiveMQ, which had already proven that it was reliable. Some people were unwilling to trust sensitive data to a system that they didn’t know much about.
Beyond that, open-source JMS providers are highly reliant on the surrounding community. With an active community of users, it's easier to troubleshoot issues and find solutions to problems. Since ActiveMQ had more community interest than HornetQ, it eventually fell behind its competitor.
Today, ActiveMQ serves as a speedy communication bridge that allows for messaging between two or more applications, even if they're written in a different programming language. It's still known for its speed, but it's also known for its reliability. The ActiveMQ message broker allows for communication between system components even when one of the components is down.
ActiveMQ was able to correct the issues that lead to its defeat in those benchmark tests, adding new features and improved functionality. It can be integrated with the Apache Camel Framework, making it possible to read and write messages between the two systems.
New features have been added with every iteration of ActiveMQ, which have helped to improve its speed and its flexibility. These features include STOMP and UDP support, mirrored queues, and broker clustering. It's used by many major companies, including SquareTrade, Cox Communications, and ClearScale.
Even though HornetQ is no longer updated, it lives on in ActiveMQ, the JMS it defeated in its record-breaking benchmark test. You can see its influence in other JMS providers as well, like ActiveMQ's main competitor, Kafka. HornetQ may not be in use today, but that doesn't mean it should be forgotten. Modern developers can still learn from the way HornetQ enhanced Java with just a few lines of native code.
Artemis, the ActiveMQ subproject that’s specifically based on HornetQ’s code, is intended to be a next-generation ActiveMQ broker. It currently serves as a successor to the ActiveMQ classic. According to Apache’s Artemis roadmap, it could eventually serve as the next significant version of ActiveMQ.
Currently, Artemis offers protocol support for Stomp, OpenWire, MQTT, and more. It offers features like replicated message store and message scheduling. In the future, Apache intends to add additional features to enhance Artemis, such as pluggable dispatch policies and configurable IO exception handling.
Even though HornetQ is no longer updated, it lives on in ActiveMQ, the JMS it defeated in its record-breaking benchmark test. HornetQ may not be in use today, but that doesn’t mean it should be forgotten. Artemis may eventually become the next-generation messaging broker that many people hoped HornetQ would some be.
Opinions expressed by DZone contributors are their own.