Example usage for Java org.springframework.amqp.rabbit.listener SimpleMessageListenerContainer fields, constructors, methods, implement or subclass
The text is from its open source code.
SimpleMessageListenerContainer(ConnectionFactory connectionFactory) Create a listener container from the connection factory (mandatory). | |
SimpleMessageListenerContainer() Default constructor for convenient dependency injection via setters. |
void | addQueueNames(String... queueName) Add queue(s) to this container's list of queues. |
void | afterPropertiesSet() Delegates to #validateConfiguration() and #initialize() . |
void | destroy() Calls #shutdown() when the BeanFactory destroys the container instance. |
AcknowledgeMode | getAcknowledgeMode() |
int | getActiveConsumerCount() |
Object | getMessageListener() |
String[] | getQueueNames() |
boolean | isActive() |
boolean | isRunning() Determine whether this container is currently running, that is, whether it has been started and not stopped yet. |
boolean | removeQueues(Queue... queue) Remove queues from this container's list of queues. |
void | setAcknowledgeMode(AcknowledgeMode acknowledgeMode) Flag controlling the behaviour of the container with respect to message acknowledgement. |
void | setAdviceChain(Advice... adviceChain) Public setter for the Advice to apply to listener executions. |
void | setAfterReceivePostProcessors(MessagePostProcessor... afterReceivePostProcessors) Set MessagePostProcessor s that will be applied after message reception, before invoking the MessageListener . |
void | setApplicationContext(ApplicationContext applicationContext) |
void | setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) |
void | setAutoStartup(boolean autoStartup) Set whether to automatically start the container after initialization. |
void | setBeanName(String beanName) |
void | setChannelTransacted(boolean transactional) Flag to indicate that channels created by this component will be transactional. |
void | setConcurrentConsumers(final int concurrentConsumers) Specify the number of concurrent consumers to create. |
void | setConnectionFactory(ConnectionFactory connectionFactory) Set the ConnectionFactory to use for obtaining RabbitMQ Connection Connections . |
void | setConsumerArguments(Map Set consumer arguments. |
void | setDeclarationRetries(int declarationRetries) Set the number of retries after passive queue declaration fails. |
void | setDefaultRequeueRejected(boolean defaultRequeueRejected) Set the default behavior when a message is rejected, for example because the listener threw an exception. |
void | setErrorHandler(ErrorHandler errorHandler) Set an ErrorHandler to be invoked in case of any uncaught exceptions thrown while processing a Message. |
void | setExclusive(boolean exclusive) Set to true for an exclusive consumer - if true, the concurrency must be 1. |
void | setFailedDeclarationRetryInterval(long failedDeclarationRetryInterval) Set the interval between passive queue declaration attempts in milliseconds. |
void | setMaxConcurrentConsumers(int maxConcurrentConsumers) Sets an upper limit to the number of consumers; defaults to 'concurrentConsumers'. |
void | setMessageListener(MessageListener messageListener) Set the MessageListener . |
void | setMessagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter) Set the MessagePropertiesConverter for this listener container. |
void | setMissingQueuesFatal(boolean missingQueuesFatal) When true, if the queues are removed while the container is running, the container is stopped. |
void | setPrefetchCount(int prefetchCount) Tell the broker how many messages to send to each consumer in a single request. |
void | setQueueNames(String... queueName) |
void | setQueues(Queue... queues) Set the name of the queue(s) to receive messages from. |
void | setReceiveTimeout(long receiveTimeout) The time (in milliseconds) that a consumer should wait for data. |
void | setRecoveryBackOff(BackOff recoveryBackOff) Specify the BackOff for interval between recovery attempts. |
void | setRecoveryInterval(long recoveryInterval) Specify the interval between recovery attempts, in milliseconds. |
void | setRetryDeclarationInterval(long retryDeclarationInterval) When consuming multiple queues, set the interval between declaration attempts when only a subset of the queues were available (milliseconds). |
void | setStatefulRetryFatalWithNullMessageId(boolean statefulRetryFatalWithNullMessageId) Set whether a message with a null messageId is fatal for the consumer when using stateful retry. |
void | setTaskExecutor(Executor taskExecutor) Set a task executor for the container - used to create the consumers not at runtime. |
void | setTransactionManager(PlatformTransactionManager transactionManager) Set the transaction manager to use. |
void | setTxSize(int txSize) Tells the container how many messages to process in a single transaction (if the channel is transactional). |
void | shutdown() Stop the shared Connection, call #doShutdown() , and close this container. |
void | start() Start this container. |
void | stop() Stop this container. |