Class TemporaryQueueReplyManager

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.rabbitmq.reply.ReplyManagerSupport
org.apache.camel.component.rabbitmq.reply.TemporaryQueueReplyManager
All Implemented Interfaces:
AutoCloseable, ReplyManager, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class TemporaryQueueReplyManager extends ReplyManagerSupport
A ReplyManager when using temporary queues.
  • Constructor Details

    • TemporaryQueueReplyManager

      public TemporaryQueueReplyManager(org.apache.camel.CamelContext camelContext)
  • Method Details

    • createReplyHandler

      protected ReplyHandler createReplyHandler(ReplyManager replyManager, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, String originalCorrelationId, String correlationId, long requestTimeout)
      Specified by:
      createReplyHandler in class ReplyManagerSupport
    • updateCorrelationId

      public void updateCorrelationId(String correlationId, String newCorrelationId, long requestTimeout)
      Description copied from interface: ReplyManager
      Updates the correlation id to the new correlation id.

      This is only used when useMessageIDasCorrelationID option is used, which means a provisional correlation id is first used, then after the message has been sent, the real correlation id is known. This allows us then to update the internal mapping to expect the real correlation id.

      Parameters:
      correlationId - the provisional correlation id
      newCorrelationId - the real correlation id
      requestTimeout - the timeout
    • handleReplyMessage

      protected void handleReplyMessage(String correlationID, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] message)
      Specified by:
      handleReplyMessage in class ReplyManagerSupport
    • createListenerContainer

      protected com.rabbitmq.client.Connection createListenerContainer() throws Exception
      Specified by:
      createListenerContainer in class ReplyManagerSupport
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class ReplyManagerSupport
      Throws:
      Exception