JMS is based on creation and delivery of messages. Messages are structured data that one application sends to another. The creator of the message is known as the producer and the receiver of the message is known as the
consumer. The TIBCO EMS server acts as an intermediary for the message and manages its delivery to the correct destination. The server also provides enterprise-class functionality such as fault-tolerance, message routing, and communication with other messaging systems, such as TIBCO FTL, TIBCO Rendezvous, and TIBCO SmartSockets.
Figure 1 illustrates an application producing a message, sending it by way of the server, and a different application receiving the message.
Point-to-point messaging has one producer and one consumer per message. This style of messaging uses a queue to store messages until they are received. The message producer sends the message to the queue; the message consumer retrieves messages from the queue and sends acknowledgment that the message was received.
Figure 2 illustrates point-to-point messaging using a non-exclusive queue. Each message consumer receives a message from the queue and acknowledges receipt of the message. The message is taken off the queue so that no other consumer can receive it.
In a publish and subscribe message system, producers address messages to a topic. In this model, the producer is known as a
publisher and the consumer is known as a
subscriber.
Figure 3 illustrates publish and subscribe messaging. Each message consumer subscribes to a topic. When a message is published to that topic, all subscribed consumers receive the message.
See Creating a Message Consumer for details on how to create durable subscribers.
For example, the topic foo might have the following subscriptions:
If a message is received on foo, each of the above four subscriptions receive that same message. For the shared subscriptions
mySharedSub and
myDurableSharedSub, the message is delivered to only one if its respective shared consumers.
If the shared consumers of the shared durable subscription myDurableSharedSub are closed, then the shared durable subscription continues to exist and accumulate messages until it is deleted, or until the application creates a new durable shared consumer named
myDurableSharedSub to resume this subscription. If the shared consumers of
mySharedSub are all closed, the subscription is removed from topic foo.
See Creating a Message Consumer for details on how to create shared subscriptions.