Publishing Messages
This section describes how to publish messages using the JMS API. It also discusses creating Destination objects that messages can be published to and consumed from.
Related Event Broker Provisioning and Configuration Information
For JMS clients to publish messages within the Message VPN they are connected to, they must be assigned appropriately configured client profiles and/or Access Control List (ACL) profiles:
- To publish messages with a Guaranteed Transport delivery mode, 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.
You cannot publish a Guaranteed message larger than the event broker's maximum Guaranteed message size—30MB in most cases. If you try to publish a message that exceeds the maximum size, the PubSub+ JMS API throws an exception with the subcode MESSAGE_TOO_LARGE
. To prevent disruptions, design your application to control message sizes and ensure they stay within the supported limit.
For more information on configuring client profiles and ACLs on event brokers, refer to Management & Shell Users.
Related Sample
For an example of how to publish messages, refer to the SolJMSProducer
sample.