Changes in 1.3 Since 1.2

Listener Concurrency

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.spring-doc.cn

Listener Queues

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 Container Queuesspring-doc.cn

This listener container now redeclares any auto-delete queues during startup. See auto-delete Queues.spring-doc.cn

Consumer Priority

The listener container now supports consumer arguments, letting the x-priority argument be set. See Consumer Priority.spring-doc.cn

Exclusive Consumer

You can now configure SimpleMessageListenerContainer with a single exclusive consumer, preventing other consumers from listening to the queue. See Exclusive Consumer.spring-doc.cn

Rabbit Admin

You can now have the broker generate the queue name, regardless of durable, autoDelete, and exclusive settings. See Configuring the Broker.spring-doc.cn

Direct Exchange Binding

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="".spring-doc.cn

AmqpTemplate Changes

The AmqpTemplate now provides several synchronous receiveAndReply methods. These are implemented by the RabbitTemplate. For more information see Receiving Messages.spring-doc.cn

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.spring-doc.cn

Caching Connection Factory

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.spring-doc.cn

Binding Arguments

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.spring-doc.cn

Routing Connection Factory

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.spring-doc.cn

MessageBuilder and MessagePropertiesBuilder

“Fluent APIs” for building messages or message properties are now provided. See Message Builder API.spring-doc.cn

RetryInterceptorBuilder Change

A “Fluent API” for building listener container retry interceptors is now provided. See Failures in Synchronous Operations and Options for Retry.spring-doc.cn

RepublishMessageRecoverer Added

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.spring-doc.cn

Default Error Handler (Since 1.3.2)

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.spring-doc.cn

Listener Container 'missingQueuesFatal` Property (Since 1.3.5)

The SimpleMessageListenerContainer now has a property called missingQueuesFatal (default: true). Previously, missing queues were always fatal. See Message Listener Container Configuration.spring-doc.cn