Main features of asynchronous messaging technology JMS, AMQP and MQTT

Messaging has been successfully used around the world as a basic communication mechanism. Whether it is between people, machines and people, or between machines and machines, messaging has always been the only common means of communication. There are two basic mechanisms for exchanging messages between two (or more) parties.

Synchronous messaging

Asynchronous messaging

Synchronous messaging is used in this situation when the sender of the message wants to receive a response within a certain time frame before proceeding to the next task. Basically, he is always in a "blocking" state before receiving a response.

Asynchronous messages mean that the sender does not require immediate response and does not block the entire process. The response is optional, and the sender always performs the remaining tasks.

The technique mentioned above makes extensive use of asynchronous messaging when programs on two computers communicate with each other. With the rise of the microservices architecture, it is clear that we need to build services using asynchronous messaging models.

This has always been a fundamental issue in software engineering, and different people and organizations have come up with different approaches. I will introduce the three most successful asynchronous messaging technologies that are widely used in enterprise IT systems.

Java Messaging Service (JMS)

JMS is one of the most successful asynchronous messaging technologies. With the use of Java in many large enterprise applications, JMS has become the first choice for enterprise systems. It defines the API for building a messaging system.

Main features of asynchronous messaging technology JMS, AMQP and MQTT

Image from the network

Here are the main features of JMS:

Standard messaging API for the Java platform

Interoperability in Java or JVM languages ​​such as Scala and Groovy

No need to worry about the underlying protocol

There are two messaging models for queues and topics

Support transaction

Ability to define message formats (message headers, attributes, and content)

Advanced Message Queueing Protocol (AMQP)

JMS is great and people are happy to use it. Microsoft has developed NMS (.NET Messaging Service) to support their platforms and programming languages, and it works well. But it has encountered the problem of interoperability. How do two sets of programs that use two different programming languages ​​communicate with each other through their asynchronous messaging mechanisms? At this point you need to define a common standard for asynchronous messaging. Neither JMS nor NMS has a standard underlying protocol. They can run on any underlying protocol, but the API is tied to the programming language. AMQP solves this problem by using a standard set of underlying protocols, adding many other features to support interoperability, and enriching messaging requirements for modern applications.

Main features of asynchronous messaging technology JMS, AMQP and MQTT

Image from the network

The following are the main features of AMQP:

Platform-independent underlying messaging protocol

Consumer-driven messaging

Cross-language and platform interoperability

It is the underlying protocol

There are 5 types of exchange direct, fanout, topic, headers, system

Cache oriented

High performance

Support for long-cycle messaging

Support classic message queue, loop, store and forward

Support transaction (cross message queue)

Support for distributed transactions (XA, X/OPEN, MS DTC)

Secure with SASL and TLS

Support proxy security server

Metadata can control message flow

Does not support LVQ

Client and server peer

Scalable

Bar Sign

Bar Sign,Led Soft Light Tube,Outdoor Led Aluminum Bar Lamp,Full Color Strip Lamp

Kindwin Technology (H.K.) Limited , https://www.ktl-led.com