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.
- 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 are decoupled.
- Publish the messages to a queue
- Used for point-to-point models.
- 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 doesn't exist, or is not able to spool the message (perhaps if it's 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 event broker 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 event broker:
- A queue that matches the messages’ queue destination.
- A topic endpoint that is assigned a topic subscription that matches the message’s topic destination.
Messages published with a Direct delivery mode
It's 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's 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.
Messages larger than the event broker's maximum message size
All SMF guaranteed messages larger than the event broker's maximum guaranteed message size—30MB in most cases—will be discarded. The publishing client will be disconnected, and
CLIENT_CLIENT_MESSAGE_TOO_BIG event is raised.