Messaging Models

The JMS API supports the following messaging models:

  • Publish-and-subscribe

    Publish-and-subscribe messaging uses topics. JMS clients can publish messages to topics, and they can use topic subscriptions to consume messages that are published to specific topics.

    Topic subscriptions act as targets for specific topics. For example, messages are published to a topic, and the topic subscriptions for that topic attract matching messages to physical endpoints provisioned on the event broker for those topic subscriptions. Therefore, in a pub/sub model, it is possible for a message to be distributed to multiple clients when those clients have matching topic subscriptions.

  • Point-to-point (PTP)

    PTP messaging uses queues. A queue is a destination provisioned on the event broker to which a producer can send messages for consumers. (A maximum of 1,000 consumers can bind to a queue.)

    When multiple consumers bind to a queue, messages are delivered according to the access type set for the queue. Solace JMS supports the following access types:

    • Exclusive

      Only the first consumer to bind to a queue can consume messages from it. If the first consumer disconnects, the second consumer can start consuming messages, and so on. An exclusive queue always delivers messages in the order they are received.

    • Non-exclusive

      All bound consumers are able to receive messages, and when multiple consumers are bound to a non‑exclusive Queue, they receive messages in a round-robin fashion.

      Each bound consumer is serviced in round-robin fashion. This provides load‑balancing; however, messages can be delivered to consumers out of order.