Spring AMQP (for Java) 1.4 Milestone 1 Available

Releases | Gary Russell | September 05, 2014 | ...

We are pleased to announce that the first milestone of Spring AMQP 1.4 is now available.

##Key Features

  • Annotation-based message listeners (@RabbitListener), enabled with either @EnableRabbit or <rabbit:annotation-driven /> (see below for an example).
  • RabbitMessagingTemplate allowing interaction with RabbitMQ using spring-messaging Message objects.
  • A new factory bean to ease the configuration of SSL with the RabbitConnectionFactory
  • Log4j Appender now supports configuration of message persistence.

Here is a simple example for a POJO service using the new annotations:

public static class MyService {

	@RabbitListener(queues = "fooQ")
	public String capitalize(String foo) {
		return foo.toUpperCase();
	}

}

@Configuration
@EnableRabbit
public static class EnableRabbitConfig {

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

	@Bean
	public MyService myService() {
		return new MyService();
	}

	// Rabbit infrastructure setup

	@Bean
	public ConnectionFactory rabbitConnectionFactory() {
		CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
		connectionFactory.setHost("localhost");
		return connectionFactory;
	}

}

See the Release Notes and the Project Page for more information.

A minor 1.3.6 Maintenance Release is also available.

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

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

Learn more

Get support

Tanzu Spring 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