Package org.apache.activemq.artemis.ra
Class ActiveMQRAQueueSender
java.lang.Object
org.apache.activemq.artemis.ra.ActiveMQRAMessageProducer
org.apache.activemq.artemis.ra.ActiveMQRAQueueSender
- All Implemented Interfaces:
MessageProducer,QueueSender,AutoCloseable
A wrapper for a
QueueSender.-
Field Summary
Fields inherited from class org.apache.activemq.artemis.ra.ActiveMQRAMessageProducer
producer, session -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetQueue()Gets the queue associated with thisQueueSender.voidSends a message to a queue for an unidentified message producer.voidSends a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live.Methods inherited from class org.apache.activemq.artemis.ra.ActiveMQRAMessageProducer
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.jms.MessageProducer
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveMethods inherited from interface jakarta.jms.QueueSender
send, send
-
Constructor Details
-
ActiveMQRAQueueSender
-
-
Method Details
-
getQueue
Gets the queue associated with thisQueueSender.- Specified by:
getQueuein interfaceQueueSender- Returns:
- this sender's queue
- Throws:
JMSException- if the Jakarta Messaging provider fails to get the queue for thisQueueSenderdue 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:
sendin interfaceQueueSender- Parameters:
destination- the queue to send this message tomessage- the message to senddeliveryMode- the delivery mode to usepriority- the priority for this messagetimeToLive- 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
Sends a message to a queue for an unidentified message producer. Uses theQueueSender'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:
sendin interfaceQueueSender- Parameters:
destination- the queue to send this message tomessage- 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:
-