Message Queuing Concepts




This technology builds on two basic concepts: messages and queues:

Queues:
A Queue is a container of messages. New messages are placed at the end of the queue, and messages
are usually retrieved from the front of the queue.
Queuing is the mechanism by which messages are held until an application is ready to process them.
 Queuing allows you to:
   1. Communicate between programs
   2. Select the order in which a program processes messages.
   3. Balance loads on a system
   4. Increase the availability of your applications 

Provides a buffer between the producer and consumer
Asynchronous
Producer and consumer communicates in Asynchronous mode . i.e. No wait state.
Synchronous
Producer must wait for the consumer to become available and complete the processing of the message before being able to continue
Batch processing
A server might not want to process  and consume each message as it arrives on a particular queue and process them in one batch.

Message:
A node in a system often needs to communicate information to, or request a service from, another node in that system or an interconnected system. This
piece of information or request can be considered a message
In message queuing, a message is a collection of data sent by one program and intended for another program.
WebSphere MQ defines four types of message:
  Datagram A simple message for which no reply is expected
  Request A message for which a reply is expected
  Reply A reply to a request message
  Report A message that describes an event such as the  
  occurrence of an error
A WebSphere MQ message consists of control information and application data.
The control information is defined in a message descriptor structure (MQMD) and contains such things as:
The type of the message
An identifier for the message
The priority for delivery of the message

Types of Messaging:
-- Point-to-point
-- Publish/Subscribe

Point-to-point Messaging

Many messages are intended to be consumed exactly once. The point within the system that consumes the message might or might not be known to the producer of the message.
The producer provides enough information for the messaging infrastructure to deliver the message to a single consumer.
In point-to-point messaging a message arrives once, and once only, at a single and correct destination.
Categories of PTP Messaging
Send and forget messaging:
A message is sent to a service that performs an action based on that message.
Request/reply messaging:
A message is sent to a service that performs an action based on that message and then returns a reply to the originator of the message.

Publish/Subscribe Messaging

Publish/subscribe messaging provides the concept of a topic on which any
number of interested consumers of information can subscribe in order to register
their interest. This is similar to the way that a person might subscribe only to
magazines about topics in which they are interested. Each topic provides
particular event or state information.












Read More Add your Comment 0 comments

What Is Message Queuing ?



Message Queuing


Message Queuing (aka MQ) is a way for applications running on various platforms, at various times and various servers, to communicate with each other across heterogeneous networks that may be temporarily off-line. It provides a form of communication between applications without the hassle of dealing with low-level communication interfaces/protocols. 

In a queuing environment, messages between therefor only the queuing system must be available. After the message is put in the queuing system, it is made available by the queuing system to the receiving application .
Messages are stored in queues until an application is ready to read and process them; this is an asynchronous communications method. A synchronous method is also possible, using the Request-Reply mechanism

This is one of important technology of Application servers and enterprise applications.

Main features of Message queuing:

1. There are no direct connections between programs.
2. Communication between programs can be time-independent.
3. Work can be carried out by small, self-contained programs.
4. Communication can be driven by events.
5. Applications can assign a priority to a message
6. Security.
7. Data integrity.
8. Recovery support.



Read More Add your Comment 0 comments
 

© 2010 Codes & Concepts All Rights Reserved Thesis WordPress Theme Converted into Blogger Template by Hack Tutors.info