The Two JMS Message Models

JMS supports two different ways of using messaging between a producer and consumer. The two messaging models are known as

  • PTP (Point-to-Point)— Message delivered to one recipient.

  • Pub/Sub (Publish/Subscribe)— Message delivered to multiple recipients.

JMS supports these two models by using distinct interfaces within the API for each messaging model. The javax.jms.Queue interface handles the PTP messaging model, while the Pub/Sub model is handled by the javax.jms.Topic interface. Other interfaces work closely with one or the other or both of these primary interfaces to help implement the messaging model. Both the Queue and Topic interfaces extend the javax.jms.Destination interface. The JMS interfaces are covered in ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.