Asynchronous messaging

asynchronous messaging

Messaging is all about the transmission of data. Period.

Asynchronous messaging is a data transmission method where the system places a message onto a message queue and does not require an immediate response. This term is also known as message-oriented middleware and it is generally known as messaging, since other types of data transfer are referred to by their technical name (for instance, https data transfers when talking about synchronous communications). 

Technologies change continually therefore applications and systems need to accommodate such changes and ensure proper functioning over a large period of time and full compatibility with other systems. For instance, businesses need to be able to communicate with their providers, logistics and other types of business partners that are vital to their operations. The way of achieving this is by having a separate layer that ensures communications despite differences in operating systems, network protocols or programming languages.

Asynchronous messaging is performed by middleware-oriented messaging solutions such as IBM MQ or RabbitMQ, which are software solutions that have been designed for the purpose of transmitting data over distributed systems, over large networks, in a secure manner, by decoupling the applications from one another.

Decoupling the application is the backbone of asynchronous messaging, its purpose of existence. Asynchronous messaging ensures the decoupling of the application by having an intermediary (the middleware) taking care of the communications, querying it via an API or client.

asynchronous messaging

The message-oriented middleware uses a set of logical objects in order to make this possible: queue managers, channels, queues and messages. We can observe these essential elements for asynchronous messaging in the figure below, where messages 1 and 2 are being sent from Application A to Application B.

asynchronous messaging

Asynchronous messaging with IBM MQ

Messages are strings of data in any format written by an application onto a queue that resides in a queue manager. The connection between the application and the queue manager is performed via a communication link called a channel. Messages represent the reason for existence of asynchronous messaging since it represents the data that needs to be transmitted to the destination. Messages consist of two main parts: the message header (special attributes necessary for their transmission via queue-based systems) and the payload (the actual data that is being transmitted). In the figure below, we have a sample of a message transmitted from one queue manager to another, via IBM MQ.

asynchronous messaging

A sample of a message. Green frame: the message header (properties). Red frame: the data itself – an XML

Queue managers are the main object within a message-oriented middleware solution. They manage the resources associated with it, they provide queuing services to the applications and manage all connections to and from the queue manager. Seen from the perspective of a client/server paradigm, the queue manager is the server therefore it can be invoked inside a network by its name. Queue managers are the logical container that include all the necessary resources for asynchronous communications. In some MOM distributions, for instance IBM MQ, they are also referred to as “IBM MQ servers”.

Channels are logical communication links established between two queue managers  or between a client and a queue manager.

Queues are logical objects within a queue manager, on which applications can put messages and from which they read messages. If the receiving application is offline, data transmission will still be online, as the messages will be temporarily stored in the queue residing in the destination queue manager, until the configured limits are met

 

Asynchronous messaging

In short, asynchronous messaging systems comply with four essential elements:

  • ensure a reliable message delivery
  • support various messaging patterns or paradigms like point-to-point or publish/subscribe
  • ensure a distribution system that routes and delivers messages
  • support for message formats as stream, bytes and text

 

 

asynchronous messaging

1 thought on “Asynchronous messaging

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.