Class RedisQueueOutboundGateway

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

public class RedisQueueOutboundGateway extends AbstractReplyProducingMessageHandler
Since:
4.1
Author:
David Liu, Artem Bilan, Gary Russell, Glenn Renfro
  • Constructor Details

  • Method Details

    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader beanClassLoader)
      Specified by:
      setBeanClassLoader in interface BeanClassLoaderAware
      Overrides:
      setBeanClassLoader in class AbstractReplyProducingMessageHandler
    • setReceiveDuration

      public void setReceiveDuration(Duration receiveTimeout)
      This timeout is used when retrieving elements from the queue specified by BoundListOperations.

      If the queue does contain elements, the data is retrieved immediately. However, if the queue is empty, the Redis connection is blocked until either an element can be retrieved from the queue or until the specified timeout passes.

      A timeout of zero can be used to block indefinitely. If not set explicitly the timeout value will default to 1000 millis

      See also: https://redis.io/commands/brpop

      Parameters:
      receiveTimeout - Duration containing the receive timeout.
      Since:
      7.1
    • setReceiveTimeout

      @Deprecated(forRemoval=true, since="7.1") public void setReceiveTimeout(int receiveTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 7.1 in favor of setReceiveTimeout(long)
      This timeout is used when retrieving elements from the queue specified by BoundListOperations.

      If the queue does contain elements, the data is retrieved immediately. However, if the queue is empty, the Redis connection is blocked until either an element can be retrieved from the queue or until the specified timeout passes.

      A timeout of zero can be used to block indefinitely. If not set explicitly the timeout value will default to 1000 millis

      See also: https://redis.io/commands/brpop

      Parameters:
      receiveTimeout - Must be non-negative. Specified in milliseconds.
    • setReceiveTimeout

      public void setReceiveTimeout(long receiveTimeout)
      This timeout is used when retrieving elements from the queue specified by BoundListOperations.

      If the queue does contain elements, the data is retrieved immediately. However, if the queue is empty, the Redis connection is blocked until either an element can be retrieved from the queue or until the specified timeout passes.

      A timeout of zero can be used to block indefinitely. If not set explicitly the timeout value will default to 1000 millis

      See also: https://redis.io/commands/brpop

      Parameters:
      receiveTimeout - Must be non-negative. Specified in milliseconds.
    • setExtractPayload

      public void setExtractPayload(boolean extractPayload)
    • setSerializer

      public void setSerializer(RedisSerializer<?> serializer)
    • getComponentType

      public String getComponentType()
      Specified by:
      getComponentType in interface NamedComponent
      Overrides:
      getComponentType in class MessageHandlerSupport
    • handleRequestMessage

      protected @Nullable Object handleRequestMessage(Message<?> message)
      Description copied from class: AbstractReplyProducingMessageHandler
      Subclasses must implement this method to handle the request Message. The return value may be a Message, a MessageBuilder, or any plain Object. The base class will handle the final creation of a reply Message from any of those starting points. If the return value is null, the Message flow will end here.
      Specified by:
      handleRequestMessage in class AbstractReplyProducingMessageHandler
      Parameters:
      message - The request message.
      Returns:
      The result of handling the message, or null.