As described in JMS Message Models, a
Message Producer is an EMS client that either publishes messages to a topic or sends messages to a queue. When working with topics, a Message Producer is commonly referred to as a
Publisher. Optionally, when creating a Message Producer, you can set the destination to NULL and specify the destination when you send or publish a message, as described in
Sending Messages.
You must have send permission on a queue to create a message producer that sends messages to that queue. You must have
durable permission on the topic to create a new durable subscriber for that topic, and have at least
use_durable permission on the topic to attach to an existing durable subscriber for the topic. See
User Permissions for details.
See the tibjmsMsgProducer.java sample client for a working example.
See the tibemsMsgProducer.c sample client for a working example.
See the csMsgProducer.cs sample client for a working example.
A message producer can be configured to generate messages with default headers and properties that define how those messages are to be routed and delivered. Specifically, you can:
For example, as described in the Message Delivery Modes, you can set the message deliver mode to either
PERSISTENT,
NON_PERSISTENT, or
RELIABLE_DELIVERY.
Use the MessageProducer object’s
setDeliveryMode() method to configure your Message Producer with a default delivery mode of
RELIABLE_DELIVERY:
See the tibjmsMsgProducerPerf.java sample client for a working example.
Use the tibemsMsgProducer_SetDeliveryMode function to configure your Message Producer to set a default delivery mode for each message it produces to
RELIABLE_DELIVERY:
See the csMsgProducerPerf.cs sample client for a working example.