Spring AMQP 1.6.0 Release Candidate (and 1.5.6) Available

Releases | Gary Russell | May 06, 2016 | ...

We are pleased to announce that the Spring AMQP 1.6 release candidate (1.6.0.RC1) is now available in the spring milestone repo.

The 1.5.6 maintenance release is also available with a few bug fixes.

Here is a summary of the 1.6.0 release contents, for more details, refer to the what's new in the reference documentation as well as the closed JIRA Issues for this release.

  • A new jar spring-rabbit-test containing a test harness to help with testing @RabbitListener methods; see the testing chapter.

  • Multiple @RabbitListener annotations on a method (when using Java 8) and the @RabbitListeners annotation (for pre-Java 8), each allowing the same method to be the listener method for multiple listener containers.

  • Full support for the Delayed Message Exchange RabbitMQ plugin.

  • An AsyncRabbitTemplate returning ListenableFuture<?> for request/reply messaging.

  • An option to publish ApplicationEvents when listener containers go idle.

  • The caching connection factory now exposes cache statistics

  • @RabbitListener methods now communicate type information to the message converter for inbound messages. This means, for example, the Jackson2JsonMessageConverter no longer needs a custom class mapper when a message without type information in the headers is received (e.g. from a sender that is not a Spring AMQP app). Instead, the @RabbitListener method parameter type is used in the conversion. In addition, the Method and bean are also made available via message properties to custom converters.

@Bean
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(
		ConnectionFactory rabbitConnectionFactory) {
	SimpleRabbitListenerContainerFactory factory = 
             new SimpleRabbitListenerContainerFactory();
	factory.setConnectionFactory(rabbitConnectionFactory);
	factory.setMessageConverter(new Jackson2JsonMessageConverter());
	return factory;
}

public static class MyService {

	@RabbitListener(queues="foos")
	public void handleFoos(Foo foo) {
	    ...
	}

	@RabbitListener(queues="lists.of.bars")
	public void handleBarLists(List<Bar> bars) {
            ...
	}
}
  • @RabbitListener irrecoverable errors are now considered to be fatal by the default error handler, to avoid endless redelivery of such messages.

  • @RabbitListener @SendTo addresses (used when the inbound message has no replyTo) can now contain a SpEL expression evaluated at runtime against the input and output message.

  • When using java serialized messages, you can now specify a "white list" of allowable classes/packages for deserialization. This is recommended when receiving serialized objects from untrusted sources.

  • You can now declare 'internal' exchanges to which messages cannot be directly published.

  • The log appenders can now be configured with multiple broker addresses and client properties can be set.

  • @QueueBinding annotations now support arguments for queues, exchanges and bindings.

We expect to have the final release at the end of May.

Please download and try the release candidate so we can address any issues before GA. Next up (2017) is 2.0 which will may require Spring 5 and include some Reactive Streams effort.

We welcome any feedback, questions, or help, using the usual mechanisms:

Project Page | JIRA | Contribution | Help

Upcoming Conferences

Be sure to register for Spring I/O conference where you can learn about the latest and greatest Spring has to offer.

Also, SpringOne Platform is coming up soon!

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all