Java org.springframework.amqp.rabbit.listener SimpleMessageListenerContainer fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.amqp.rabbit.listener SimpleMessageListenerContainer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.amqp.rabbit.listener SimpleMessageListenerContainer.

The text is from its open source code.

Subclass

org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer has subclasses.
Click this link to see all its subclasses.

Constructor

SimpleMessageListenerContainer(ConnectionFactory connectionFactory)
Create a listener container from the connection factory (mandatory).
SimpleMessageListenerContainer()
Default constructor for convenient dependency injection via setters.

Method

voidaddQueueNames(String... queueName)
Add queue(s) to this container's list of queues.
voidafterPropertiesSet()
Delegates to #validateConfiguration() and #initialize() .
voiddestroy()
Calls #shutdown() when the BeanFactory destroys the container instance.
AcknowledgeModegetAcknowledgeMode()
intgetActiveConsumerCount()
ObjectgetMessageListener()
String[]getQueueNames()
booleanisActive()
booleanisRunning()
Determine whether this container is currently running, that is, whether it has been started and not stopped yet.
booleanremoveQueues(Queue... queue)
Remove queues from this container's list of queues.
voidsetAcknowledgeMode(AcknowledgeMode acknowledgeMode)

Flag controlling the behaviour of the container with respect to message acknowledgement.

voidsetAdviceChain(Advice... adviceChain)
Public setter for the Advice to apply to listener executions.
voidsetAfterReceivePostProcessors(MessagePostProcessor... afterReceivePostProcessors)
Set MessagePostProcessor s that will be applied after message reception, before invoking the MessageListener .
voidsetApplicationContext(ApplicationContext applicationContext)
voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
voidsetAutoStartup(boolean autoStartup)
Set whether to automatically start the container after initialization.
voidsetBeanName(String beanName)
voidsetChannelTransacted(boolean transactional)
Flag to indicate that channels created by this component will be transactional.
voidsetConcurrentConsumers(final int concurrentConsumers)
Specify the number of concurrent consumers to create.
voidsetConnectionFactory(ConnectionFactory connectionFactory)
Set the ConnectionFactory to use for obtaining RabbitMQ Connection Connections .
voidsetConsumerArguments(Map args)
Set consumer arguments.
voidsetDeclarationRetries(int declarationRetries)
Set the number of retries after passive queue declaration fails.
voidsetDefaultRequeueRejected(boolean defaultRequeueRejected)
Set the default behavior when a message is rejected, for example because the listener threw an exception.
voidsetErrorHandler(ErrorHandler errorHandler)
Set an ErrorHandler to be invoked in case of any uncaught exceptions thrown while processing a Message.
voidsetExclusive(boolean exclusive)
Set to true for an exclusive consumer - if true, the concurrency must be 1.
voidsetFailedDeclarationRetryInterval(long failedDeclarationRetryInterval)
Set the interval between passive queue declaration attempts in milliseconds.
voidsetMaxConcurrentConsumers(int maxConcurrentConsumers)
Sets an upper limit to the number of consumers; defaults to 'concurrentConsumers'.
voidsetMessageListener(MessageListener messageListener)
Set the MessageListener .
voidsetMessagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter)
Set the MessagePropertiesConverter for this listener container.
voidsetMissingQueuesFatal(boolean missingQueuesFatal)

When true, if the queues are removed while the container is running, the container is stopped.

voidsetPrefetchCount(int prefetchCount)
Tell the broker how many messages to send to each consumer in a single request.
voidsetQueueNames(String... queueName)
voidsetQueues(Queue... queues)
Set the name of the queue(s) to receive messages from.
voidsetReceiveTimeout(long receiveTimeout)
The time (in milliseconds) that a consumer should wait for data.
voidsetRecoveryBackOff(BackOff recoveryBackOff)
Specify the BackOff for interval between recovery attempts.
voidsetRecoveryInterval(long recoveryInterval)
Specify the interval between recovery attempts, in milliseconds.
voidsetRetryDeclarationInterval(long retryDeclarationInterval)
When consuming multiple queues, set the interval between declaration attempts when only a subset of the queues were available (milliseconds).
voidsetStatefulRetryFatalWithNullMessageId(boolean statefulRetryFatalWithNullMessageId)
Set whether a message with a null messageId is fatal for the consumer when using stateful retry.
voidsetTaskExecutor(Executor taskExecutor)
Set a task executor for the container - used to create the consumers not at runtime.
voidsetTransactionManager(PlatformTransactionManager transactionManager)
Set the transaction manager to use.
voidsetTxSize(int txSize)
Tells the container how many messages to process in a single transaction (if the channel is transactional).
voidshutdown()
Stop the shared Connection, call #doShutdown() , and close this container.
voidstart()
Start this container.
voidstop()
Stop this container.