twitter
    !! Tell us what you want to Learn / Know !!

JMS

WebLogic JMS is an enterprise-class messaging system that is tightly integrated into the WebLogic Server platform. It fully supports the JMS Specification and also provides numerous WebLogic JMS Extensions that go above and beyond the standard JMS APIs.
An enterprise messaging system enables applications to communicate with one another through the exchange of messages. A message is a request, report, and/or event that contains information needed to coordinate communication between different applications. A message provides a level of abstraction, allowing you to separate the details about the destination system from the application code.
The Java Message Service (JMS) is a standard API for accessing enterprise messaging systems. Specifically, JMS:
  • Enables Java applications sharing a messaging system to exchange messages
  • Simplifies application development by providing a standard interface for creating, sending, and receiving messages


WebLogic JMS Architecture:



JMS servers
      The JMS Servers can host a defined set of modules and any associated persistent storage that reside on a WebLogic Server instance.

JMS modules
JMS modules contain configuration resources (such as queues, topics, and connections factories).

JMS Applications
JMS applications that either produce messages to destinations or consume messages from destinations.

JNDI (Java Naming and Directory Interface)
    This provides a resource lookup facility.

Persistent Store
    File or JDBC store to store the persistent messages.

JMS Connection Factories:
Java Message Service (JMS) connection factories are objects that allow an application to create other JMS objects programmatically.

Destination Resources:
JMS destinations serve as the repositories for messages.
There are two types of destination resources:
  • Queue:
                It ensures the delivery of messages to exactly one recipient. It is a one to one communication.
  • Topic:
               It ensures the delivery of messages to multiple recipients. It is a one to many      communication.

Messaging models:
     JMS supports two messaging models: point-to-point (PTP) and publish/subscribe (pub/sub). The messaging models are very similar, except for the following differences:
  • PTP messaging model enables the delivery of a message to exactly one recipient.
  • Pub/sub messaging model enables the delivery of a message to multiple recipients.
Point to point messaging:
       The point-to-point (PTP) messaging model enables one application to send a message to another. PTP messaging applications send and receive messages using named queues. A queue sender (producer) sends a message to a specific queue. A queue receiver (consumer) receives messages from a specific queue.
The following figure illustrates PTP messaging.



Multiple queue senders and queue receivers can be associated with a single queue, but an individual message can be delivered to only one queue receiver.
If multiple queue receivers are listening for messages on a queue, WebLogic JMS determines which one will receive the next message on a first come, first serve basis. If no queue receivers are listening on the queue, messages remain in the queue until a queue receiver attaches to the queue.
Publish/Subscribe messaging:
The publish/subscribe (pub/sub) messaging model enables an application to send a message to multiple applications. Pub/sub messaging applications send and receive messages by subscribing to a topic. A topic publisher (producer) sends messages to a specific topic. A topic subscriber (consumer) retrieves messages from a specific topic.
The following figure illustrates pub/sub messaging.



Unlike with the PTP messaging model, the pub/sub messaging model allows multiple topic subscribers to receive the same message. JMS retains the message until all topic subscribers have received it.
The Pub/Sub messaging model supports durable subscribers, allowing you to assign a name to a topic subscriber and associate it with a user or application.


0 comments:

Post a Comment