Messages are sent or published by a message producer, within the context of a connection and session. Producing a message is fairly straightforward: a client uses a message producer object (MessageProducer) to send messages to a physical destination, represented in the API by a destination object.
When you create the producer, you can specify a default destination that all the producer’s messages are sent to. You can also specify default values for the message header fields that govern persistence, priority, and time-to-live. These defaults are then used by all messages issuing from that producer unless you override them by specifying an alternate destination when sending the message or by setting alternate values for the header fields for a given message.
The message producer can also implement a request-reply pattern by setting the JMSReplyTo message header field. For more information, see The Request-Reply Pattern.
In addition,Message Queue producers can specify symbolic topic destination names that use wildcard characters. Messages issueing from such wildcard producers are sent to all destinations that match the symbolic destination name. See Supported Topic Destination Names in Oracle GlassFish Server Message Queue 4.5 Administration Guide.