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.












Share your views...

0 Respones to "Message Queuing Concepts"

Post a Comment

 

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