Example usage for javax.jms MessageProducer send

List of usage examples for javax.jms MessageProducer send

Introduction

In this page you can find the example usage for javax.jms MessageProducer send.

Prototype


void send(Message message, int deliveryMode, int priority, long timeToLive,
        CompletionListener completionListener) throws JMSException;

Source Link

Document

Sends a message, specifying delivery mode, priority and time to live, performing part of the work involved in sending the message in a separate thread and notifying the specified CompletionListener when the operation has completed.

Usage

From source file:org.mule.transport.jms.Jms11Support.java

public void send(MessageProducer producer, Message message, Destination dest, boolean persistent, int priority,
        long ttl, boolean topic, ImmutableEndpoint endpoint) throws JMSException {
    producer.send(dest, message, (persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT), priority,
            ttl);/*from w w  w.j a  va  2  s  .c  o  m*/
}