Publishing Guaranteed Messages
A client application can publish Guaranteed messages, that is, messages that the client application assigns a Persistent or Non‑Persistent delivery mode to Queue or Topic destinations.
For a client to publish Guaranteed messages in a Session, a producer flow to the host event broker is required. For JCSMP, a producer flow is created when an XMLMessageProducer is acquired. For the Java RTO, C, and .NET APIs, a producer flow is automatically established when a client begins to send persistent messages in the Session.
If a client disconnects, its publisher Flow will automatically expire if the client does not reconnect within three minutes.
The published Guaranteed 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 Queue that is assigned a Topic subscription that matches the message’s Topic destination.
- A Topic Endpoint that is assigned a topic subscription that matches the message’s Topic destination.
For more information on endpoints and how to create them, refer to Receiving Guaranteed Messages.
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.
Consuming clients can receive Guaranteed messages when they bind to an endpoint by creating a Guaranteed messaging Flow to that endpoint. For information, refer to Receiving Guaranteed Messages.
The figure below shows the process of publishing and receiving Guaranteed messages.
Publishing Guaranteed Messages
Related Event Broker Provisioning and Configuration Information
For clients to publish messages to a Message VPN, the event broker must have Guaranteed Messaging and message spooling enabled. In addition, the clients must be assigned appropriately configured client profiles and/or Access Control List (ACL) profiles:
- To publish Guaranteed messages, clients must be assigned client profiles that have the
allow‑guaranteed‑message‑send
parameter enabled. - To allow clients to publish messages to topics (or to only a specific set of topics) clients must be assigned ACLs with the appropriate access controls.