发布于 2016-05-06 23:49:19 | 145 次阅读 | 评论: 0 | 来源: 网友投递
Spring AMQP 消息解决方案
Spring AMQP 是基于 Spring 框架的 AMQP 消息解决方案,提供模板化的发送和接收消息的抽象层,提供基于消息驱动的 POJO。同时有 Java 和 .NET 的版本。
Spring AMQP 1.6 和 1.6.0.RC1 发布了,主要改进记录如下:
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.