Class RqueueMessageListenerContainer

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

    public class RqueueMessageListenerContainer
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.SmartLifecycle, org.springframework.beans.factory.BeanNameAware
    Container providing asynchronous behaviour for Rqueue message listeners. Handles the low level details of listening, converting and message dispatching.
    See Also:
    SimpleRqueueListenerContainerFactory
    • Method Detail

      • getMaxWorkerWaitTime

        public long getMaxWorkerWaitTime()
      • setMaxWorkerWaitTime

        public void setMaxWorkerWaitTime​(long stopTime)
      • getBeanName

        public java.lang.String getBeanName()
      • setBeanName

        public void setBeanName​(java.lang.String name)
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware
      • getMaxNumWorkers

        public java.lang.Integer getMaxNumWorkers()
      • setMaxNumWorkers

        public void setMaxNumWorkers​(int maxNumWorkers)
      • getBackOffTime

        public long getBackOffTime()
      • setBackOffTime

        public void setBackOffTime​(long backOffTime)
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception
      • doDestroy

        protected void doDestroy()
      • getPhase

        public int getPhase()
        Specified by:
        getPhase in interface org.springframework.context.Phased
        Specified by:
        getPhase in interface org.springframework.context.SmartLifecycle
      • setPhase

        public void setPhase​(int phase)
        Configure a custom phase for the container to start. This allows to start other beans that also implements the SmartLifecycle interface.
        Parameters:
        phase - - the phase that defines the phase respecting the Ordered semantics
      • isAutoStartup

        public boolean isAutoStartup()
        Specified by:
        isAutoStartup in interface org.springframework.context.SmartLifecycle
      • setAutoStartup

        public void setAutoStartup​(boolean autoStartup)
        Control if this component should get started automatically or manually.

        A value of false indicates that the container is intended to be started and stopped through an explicit call to start() and stop(), and analogous to a plain Lifecycle implementation.

        Parameters:
        autoStartup - true/false
        See Also:
        start(), stop(), Lifecycle.stop(), ()
      • stop

        public void stop​(java.lang.Runnable callback)
        Specified by:
        stop in interface org.springframework.context.SmartLifecycle
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • createDefaultTaskExecutor

        public org.springframework.core.task.AsyncTaskExecutor createDefaultTaskExecutor​(java.util.List<QueueDetail> registeredActiveQueueDetail)
      • start

        public void start()
        Specified by:
        start in interface org.springframework.context.Lifecycle
      • doStart

        protected void doStart()
      • startGroup

        protected void startGroup​(java.lang.String groupName,
                                  java.util.List<QueueDetail> queueDetails)
      • startQueue

        protected void startQueue​(java.lang.String queueName,
                                  QueueDetail queueDetail)
      • getTaskExecutor

        public org.springframework.core.task.AsyncTaskExecutor getTaskExecutor()
      • setTaskExecutor

        public void setTaskExecutor​(org.springframework.core.task.AsyncTaskExecutor taskExecutor)
      • stop

        public void stop()
        Specified by:
        stop in interface org.springframework.context.Lifecycle
      • doStop

        protected void doStop()
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface org.springframework.context.Lifecycle
      • getPollingInterval

        public long getPollingInterval()
      • setPollingInterval

        public void setPollingInterval​(long pollingInterval)
      • getDiscardMessageProcessor

        public MessageProcessor getDiscardMessageProcessor()
      • setDiscardMessageProcessor

        public void setDiscardMessageProcessor​(MessageProcessor discardMessageProcessor)
      • getDeadLetterQueueMessageProcessor

        public MessageProcessor getDeadLetterQueueMessageProcessor()
      • setDeadLetterQueueMessageProcessor

        public void setDeadLetterQueueMessageProcessor​(MessageProcessor deadLetterQueueMessageProcessor)
      • getManualDeletionMessageProcessor

        public MessageProcessor getManualDeletionMessageProcessor()
      • setManualDeletionMessageProcessor

        public void setManualDeletionMessageProcessor​(MessageProcessor manualDeletionMessageProcessor)
      • getPostExecutionMessageProcessor

        public MessageProcessor getPostExecutionMessageProcessor()
      • setPostExecutionMessageProcessor

        public void setPostExecutionMessageProcessor​(MessageProcessor postExecutionMessageProcessor)
      • getPreExecutionMessageProcessor

        public MessageProcessor getPreExecutionMessageProcessor()
      • setPreExecutionMessageProcessor

        public void setPreExecutionMessageProcessor​(MessageProcessor preExecutionMessageProcessor)
      • setTaskExecutionBackOff

        public void setTaskExecutionBackOff​(TaskExecutionBackOff taskExecutionBackOff)
      • setPriorityMode

        public void setPriorityMode​(PriorityMode priorityMode)
      • setMiddlewares

        public void setMiddlewares​(java.util.List<Middleware> middlewares)
      • getMiddleWares

        public java.util.List<Middleware> getMiddleWares()