The listener container now supports dynamic scaling of the number of consumers based on workload, or you can programmatically change the concurrency without stopping the container. See Listener Concurrency.
The listener container now permits the queues on which it listens to be modified at runtime. Also, the container now starts if at least one of its configured queues is available for use. See Listener Queues
This listener container now redeclares any auto-delete queues during startup.
See auto-delete
Queues.
The listener container now supports consumer arguments, letting the x-priority
argument be set.
See Consumer Priority.
You can now configure SimpleMessageListenerContainer
with a single exclusive
consumer, preventing other consumers from listening to the queue.
See Exclusive Consumer.
You can now have the broker generate the queue name, regardless of durable
, autoDelete
, and exclusive
settings.
See Configuring the Broker.
Previously, omitting the key
attribute from a binding
element of a direct-exchange
configuration caused the queue or exchange to be bound with an empty string as the routing key.
Now it is bound with the the name of the provided Queue
or Exchange
.
If you wish to bind with an empty string routing key, you need to specify key=""
.
The AmqpTemplate
now provides several synchronous receiveAndReply
methods.
These are implemented by the RabbitTemplate
.
For more information see [receiving-messages].
The RabbitTemplate
now supports configuring a RetryTemplate
to attempt retries (with optional back-off policy) for when the broker is not available.
For more information see Adding Retry Capabilities.
You can now configure the caching connection factory to cache Connection
instances and their Channel
instances instead of using a single connection and caching only Channel
instances.
See Connection and Resource Management.
The <binding>
of the <exchange>
now supports parsing of the <binding-arguments>
sub-element.
You can now configure the <binding>
of the <headers-exchange>
with a key/value
attribute pair (to match on a single header) or with a <binding-arguments>
sub-element (allowing matching on multiple headers).
These options are mutually exclusive.
See Headers Exchange.
A new SimpleRoutingConnectionFactory
has been introduced.
It allows configuration of ConnectionFactories
mapping, to determine the target ConnectionFactory
to use at runtime.
See Routing Connection Factory.
“Fluent APIs” for building messages or message properties are now provided. See Message Builder API.
A “Fluent API” for building listener container retry interceptors is now provided. See Failures in Synchronous Operations and Options for Retry.
This new MessageRecoverer
is provided to allow publishing a failed message to another queue (including stack trace information in the header) when retries are exhausted.
See Message Listeners and the Asynchronous Case.
A default ConditionalRejectingErrorHandler
has been added to the listener container.
This error handler detects fatal message conversion problems and instructs the container to reject the message to prevent the broker from continually redelivering the unconvertible message.
See Exception Handling.
The SimpleMessageListenerContainer
now has a property called missingQueuesFatal
(default: true
).
Previously, missing queues were always fatal.
See Message Listener Container Configuration.