搶先一步
VMware 提供培訓和認證,以加速您的進度。
了解更多我們很高興地宣布 Spring AMQP 1.6 GA (1.6.0.RELEASE
) 現在已在 spring release repo 以及 Maven Central 中提供。
首先,感謝所有以任何方式為該專案做出貢獻的人:JIRAs、GitHub issues、Pull Requests、部落格文章和文章,甚至是簡單的 StackOverflow 問題!
您可以在之前的 Spring AMQP 1.6 RC1 部落格文章中找到完整的功能包。您可以參考參考文件中 新增功能,以及 整個 1.6 版本的已關閉 JIRA Issues。
儘管如此,我們還是遇到了幾個最後一分鐘的功能,我們也想在此分享
userIdExpression
在 RabbitTemplate
中填入 User Id 訊息屬性。 通常,我們可以從 ConnectionFactory
使用 username
<rabbit:template id="rabbitTemplate"
connection-factory="connectionFactory"
user-id-expression="@connectionFactory.username" />
Queue
和 Exchange
定義的 Builder
fluent API@Bean
public Queue fooQueue() {
return QueueBuilder.nonDurable("foo")
.autoDelete()
.exclusive()
.withArgument("foo", "bar")
.build();
}
...
@Bean
public Exchange fooExchange() {
return ExchangeBuilder.directExchange("foo")
.autoDelete()
.delayed()
.durable()
.internal()
.withArgument("foo", "bar")
.build();
}
這是最後一個 1.x
系列版本,雖然有可能維護任何 1.6.x
版本,但僅作為錯誤修復和小改進。 接下來 (2017) 是 2.0
,它可能需要 Spring 5 並包含一些 Reactive Streams 的努力和 Java 8 代碼庫。
與往常一樣,我們歡迎使用常用機制提供任何反饋、問題或幫助