Package org.apache.jmeter.protocol.jms.sampler

# Class FixedQueueExecutor

java.lang.Object
org.apache.jmeter.protocol.jms.sampler.FixedQueueExecutor

All Implemented Interfaces:
  `QueueExecutor`

public class FixedQueueExecutor extends Object implements QueueExecutor
Request/reply executor with a fixed reply queue.
Used by JMS Sampler (Point to Point)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FixedQueueExecutor(javax.jms.MessageProducer producer, int timeout, boolean useReqMsgIdAsCorrelId)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Close the resources
  `javax.jms.Message`
  `sendAndReceive(javax.jms.Message request, int deliveryMode, int priority, long expiration)`
  Sends and receives a message.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FixedQueueExecutor

    public FixedQueueExecutor(javax.jms.MessageProducer producer, int timeout, boolean useReqMsgIdAsCorrelId)
    Constructor.
    Parameters:
      `producer` - the queue to send the message on
      `timeout` - timeout to use for the return message
      `useReqMsgIdAsCorrelId` - whether to use the request message id as the correlation id

- ## Method Details

  - ### sendAndReceive

    public javax.jms.Message sendAndReceive(javax.jms.Message request, int deliveryMode, int priority, long expiration) throws javax.jms.JMSException
    Sends and receives a message.
    Specified by:
      `sendAndReceive` in interface `QueueExecutor`
    Parameters:
      `request` - the message to send
      `deliveryMode` - the delivery mode to use
      `priority` - the priority for this message
      `expiration` - messages lifetime in ms
    Returns:
      the received message or `null`
    Throws:
      `javax.jms.JMSException` - in case of an exception from the messaging system

  - ### close

    public void close() throws javax.jms.JMSException
    Description copied from interface: `QueueExecutor`
    Close the resources
    Specified by:
      `close` in interface `QueueExecutor`
    Throws:
      `javax.jms.JMSException` - in case of an exception from the messaging system