Wednesday, 24 October 2018

What is ActiveMQ?

Apache ActiveMQ is a message broker which fully implements the Java Messaging Service API 1.1 and Supports a variety of Cross Language Clients and Protocols such as Java, C, C++, C#, Ruby, Perl, Python, PHP. This makes messages to share a common format and semantic, which makes integration between different applications easier.

We are looking into a JMS example, which involves two JMS clients. First client sends a message to a queue destination. The second client retrieves the message from the same queue destination.

It is used to reliably communicate between two distributed processes. Yes, you could store messages in a database to communicate between two processes, but, as soon as the message is received you'd have to delete the message. That means a row insert and delete for each message. When you try to scale that up communicating thousands of messages per second, databases tend to fall over.

Message oriented middle-ware like ActiveMQ on the other hand are build to handle those use cases. They assume that messages in a healthy system will be deleted very quickly and can do optimizations to avoid the overhead. It can also push messages to consumers instead of a consumer having to poll for new message by doing a SQL query. This further reduces the latency involved in processing new messages being sent into the system.

Here are some of the screenshots:


https://techaffinity.com/blog/java-message-service-jms-using-activemq/


No comments:

Post a Comment