Getting Started With ActiveMQ
ActiveMQ is popular. But how does ActiveMQ work? And how can you make it work even better?
Consider this your guide to how ActiveMQ works.
We’ll cover everything you need to know about ActiveMQ. This includes an overview of message brokers, guides to ActiveMQ monitoring, tips for ActiveMQ high availability, and so much more.
Read along or jump to the section that interests you most:
Table of Contents
Overview: How Does ActiveMQ Work?
ActiveMQ works by sending messages between disparate applications.
What Is ActiveMQ?
ActiveMQ is a popular open source messaging service written in Java. It’s a type of message-oriented middleware, made up of Apache ActiveMQ brokers and application clients, called producers and consumers. ActiveMQ Artemis was originally conceived as a replacement to ActiveMQ, but it's developed into a substantially different technology with its own ideal use cases.
Other Open Source Message Brokers
There are other open source message brokers, including RabbitMQ and Kafka. ActiveMQ is known for being a mature and well-adopted platform with 1,000s of companies already using it. ActiveMQ is also the most feature-rich open source message broker available.
Related Resources
Learn more about open source message brokers and ActiveMQ:
- What Is Apache ActiveMQ?
- ActiveMQ Examples: Three Industry Use Cases
- ActiveMQ vs. Kafka
- ActiveMQ vs. RabbitMQ
Back to topRead Our Guide to Enterprise Messaging
In our Decision Maker's Guide to Enterprise Messaging, our experts walk through two applied examples of system federation and streaming data, and how middleware like ActiveMQ can be used.
Tips For Using ActiveMQ
ActiveMQ is a deceptively complex piece of software. Here are some tips to help you get the most out of using ActiveMQ.
Disable Dynamic Queue Creation
ActiveMQ creates queues on-demand by default. Destinations are created in the broker any time a client asks to utilize that destination, regardless of whether it already existed. There are some issues with this which can even lead to downtime. Disabling the dynamic ActiveMQ queue can help you avoid the risks.
Ensure High Availability
High availability (HA) is important for ActiveMQ. It’s critical that your brokers stay up and running at all times.
In order to ensure HA, you’ll need to configure your brokers for failover. If you’re configuring for failover with JDBC persistence, you’ll want to use connection pooling with c3p0 to optimize throughput to your persistence journal.
Use a Garbage Collector
ActiveMQ creates small, short-lived objects inside the JVM. This can lead to memory fragmentation and other compaction issues. So, you’ll really want to be mindful of Java’s garbage collection when administering ActiveMQ. G1GC is the best current garbage collector option for ActiveMQ.
Monitor ActiveMQ
Monitoring is critical to ensure that ActiveMQ stays healthy. There are tools you can use with ActiveMQ to monitor resource usage, queue depths, and other message behavior. To extend that monitoring further, ActiveMQ comes with a robust set of JMX metrics which can be accessed using a range of common monitoring utilities and platforms.
Improve Performance
ActiveMQ performance can vary greatly depending on the data throughput needs of your business, the size of your data payloads, and more. That’s why it’s important to improve performance through regular troubleshooting and performance tuning. Running performance tests and keeping an eye on metrics can help.
See ActiveMQ in Action
Watch this on-demand webinar to see real-world ActiveMQ applications in various industries.
ActiveMQ Support
Open source middleware needs to be backed by support in the enterprise. Why? Because technologies like ActiveMQ and Artemis bridge the gap between different applications and if they aren't set up correctly — or they fail — it could be catastrophic to your business, cascading problems down to all areas of your infrastructure.
With enterprise ActiveMQ or Artemis support, you can:
- Avoid the cost and lock-in of proprietary platforms
- Deploy an easy-to-adopt messaging service
- Have access to expertise so you can innovate faster
It’s important to find a vendor who has expertise in ActiveMQ — and can support your full stack of open source tools. OpenLogic has experts skilled in ActiveMQ and Artemis, who understand the interoperability between applications. Our experts can help you migrate off a proprietary broker like IBM MQ, set up ActiveMQ or Artemis correctly, or provide training for your team.
ActiveMQ and Artemis Solutions From OpenLogic
Why pay for middleware when there are open source options like ActiveMQ and Artemis available? OpenLogic experts can help you find success with open source middleware with 24/7 technical support and unbiased guidance every step of the way.