Class RabbitStreamMessageHandler

All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Ordered, ExpressionCapable, Orderable, IntegrationPattern, NamedComponent, IntegrationManagement, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class RabbitStreamMessageHandler extends AbstractMessageHandler
Since:
6.0
Author:
Gary Russell, Chris Bono
  • Constructor Details

  • Method Details

    • setSendFailureChannel

      public void setSendFailureChannel(MessageChannel sendFailureChannel)
      Set the failure channel. After a send failure, an ErrorMessage will be sent to this channel with a payload of the exception with the failed message.
      Parameters:
      sendFailureChannel - the failure channel.
    • setSendFailureChannelName

      public void setSendFailureChannelName(String sendFailureChannelName)
      Set the failure channel name. After a send failure, an ErrorMessage will be sent to this channel with a payload of the exception with the failed message.
      Parameters:
      sendFailureChannelName - the failure channel name.
    • setSendSuccessChannel

      public void setSendSuccessChannel(MessageChannel sendSuccessChannel)
      Set the success channel.
      Parameters:
      sendSuccessChannel - the success channel.
    • setSendSuccessChannelName

      public void setSendSuccessChannelName(String sendSuccessChannelName)
      Set the Success channel name.
      Parameters:
      sendSuccessChannelName - the success channel name.
    • setSync

      public void setSync(boolean sync)
      Set to true to wait for a confirmation.
      Parameters:
      sync - true to wait.
      See Also:
    • setConfirmTimeout

      public void setConfirmTimeout(long confirmTimeout)
      Set the confirm timeout.
      Parameters:
      confirmTimeout - the timeout.
      See Also:
    • setHeaderMapper

      public void setHeaderMapper(AmqpHeaderMapper headerMapper)
      Set a custom AmqpHeaderMapper for mapping request and reply headers. Defaults to DefaultAmqpHeaderMapper.outboundMapper().
      Parameters:
      headerMapper - the AmqpHeaderMapper to use.
    • setHeadersMappedLast

      public void setHeadersMappedLast(boolean headersMappedLast)
      When mapping headers for the outbound message, determine whether the headers are mapped before the message is converted, or afterwards. This only affects headers that might be added by the message converter. When false, the converter's headers win; when true, any headers added by the converter will be overridden (if the source message has a header that maps to those headers). You might wish to set this to true, for example, when using a SimpleMessageConverter with a String payload that contains json; the converter will set the content type to text/plain which can be overridden to application/json by setting the AmqpHeaders.CONTENT_TYPE message header. Default: false.
      Parameters:
      headersMappedLast - true if headers are mapped after conversion.
    • getStreamOperations

      public RabbitStreamOperations getStreamOperations()
      Returns:
      the operations.
    • getSendFailureChannel

      protected MessageChannel getSendFailureChannel()
    • getSendSuccessChannel

      protected MessageChannel getSendSuccessChannel()
    • handleMessageInternal

      protected void handleMessageInternal(Message<?> requestMessage)
      Specified by:
      handleMessageInternal in class AbstractMessageHandler