Publishing Guaranteed Messages

When clients publish Guaranteed messages (that is, messages with a persistent or non-persistent delivery mode), they can either:

  • publish the messages to a topic (used for publish and subscribe models)
  • publish the messages to a queue (used for point-to-point models)

A Guaranteed message published to a topic is acknowledged by the Solace message bus to indicate that the system has received the message. A message that is published to a topic can be received by no clients, a single client, or multiple clients. If there is no subscriber for a message, that message is discarded because in this paradigm the producer and subscriber is decoupled.

The Solace message bus also acknowledges a Guaranteed message published to a queue to indicate that the system has received the message. However, messages published to a queue are more tightly coupled than those published to a topic. Therefore, if the queue does not exist or is not able to spool the message (perhaps if it is shutdown or over quota), then the Solace message bus rejects the message, and the publishing client application has this immediate feedback. A message that is published to a queue can be consumed by a single consumer.

When a client publishes a Guaranteed messages in a session, a publisher flow to the host Solace router is automatically established. The published messages have persistence because they are spooled (that is, they are written to persistent storage) to one of the following types of endpoints provisioned on the router:

  • a queue that matches the messages’ queue destination
  • a topic endpoint that is assigned a topic subscription that matches the message’s topic destination

Note:   It is also possible for messages published with a Direct delivery mode to be spooled to an endpoint when there is a match between the message’s topic destination and the topic subscription set for the endpoint. In this case, when the message is spooled to the endpoint, it is given a non-persistent delivery mode so that a client can consume the message over its established Guaranteed message Flow. For more information, refer to Topic Matching and Message Delivery Modes.