Class ActiveMQRAQueueSender

java.lang.Object
org.apache.activemq.artemis.ra.ActiveMQRAMessageProducer
org.apache.activemq.artemis.ra.ActiveMQRAQueueSender
All Implemented Interfaces:
MessageProducer, QueueSender, AutoCloseable

public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements QueueSender
A wrapper for a QueueSender.
  • Constructor Details

  • Method Details

    • getQueue

      public Queue getQueue() throws JMSException
      Gets the queue associated with this QueueSender.
      Specified by:
      getQueue in interface QueueSender
      Returns:
      this sender's queue
      Throws:
      JMSException - if the Jakarta Messaging provider fails to get the queue for this QueueSender due to some internal error.
    • send

      public void send(Queue destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
      Sends a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live.

      Typically, a message producer is assigned a queue at creation time; however, the Jakarta Messaging API also supports unidentified message producers, which require that the queue be supplied every time a message is sent.

      Specified by:
      send in interface QueueSender
      Parameters:
      destination - the queue to send this message to
      message - the message to send
      deliveryMode - the delivery mode to use
      priority - the priority for this message
      timeToLive - the message's lifetime (in milliseconds)
      Throws:
      JMSException - if the Jakarta Messaging provider fails to send the message due to some internal error.
      MessageFormatException - if an invalid message is specified.
      InvalidDestinationException - if a client uses this method with an invalid queue.
    • send

      public void send(Queue destination, Message message) throws JMSException
      Sends a message to a queue for an unidentified message producer. Uses the QueueSender's default delivery mode, priority, and time to live.

      Typically, a message producer is assigned a queue at creation time; however, the Jakarta Messaging API also supports unidentified message producers, which require that the queue be supplied every time a message is sent.

      Specified by:
      send in interface QueueSender
      Parameters:
      destination - the queue to send this message to
      message - the message to send
      Throws:
      JMSException - if the Jakarta Messaging provider fails to send the message due to some internal error.
      MessageFormatException - if an invalid message is specified.
      InvalidDestinationException - if a client uses this method with an invalid queue.
      See Also: