Messaging Models

JMS specification supports two messaging models:

  • Point-to-Point (PTP)

    The PTP messaging model is based on message queues. JMS clients send messages to and receive messages from specific message queues provided by the JMS provider. In the PTP messaging model, only one client can retrieve a message from the message queue. Once a JMS client has retrieved a message from a message queue, the message is no longer available for any other JMS client accessing the message queue. A message is addressed to a specific message queue and it remains in the queue until a client removes it. Message queues are generally configured and stored in a JNDI namespace and are available for clients by standard JNDI lookup. In the PTP model message producers are called queue senders and message consumers are called queue receivers.

  • Publish/Subscribe (Pub/Sub)

    The Pub/Sub messaging model is based on content hierarchies. This model enables messages to be addressed to more than one client. In the Pub/Sub model, message producers are called topic publishers and message consumers are called topic subscribers. Publishers send messages to topics to which multiple clients subscribe. Topics are generally configured and stored in a JNDI namespace and are available for clients by standard JNDI lookup. A topic can have multiple publishers as well.

In both messaging models clients can invariantly act as message producers and message consumers. Messaging models are dealt with in further detail in 5.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net