Changes between 5.4 and 5.5
File Aggregator
引入了基于 FileSplitter.FileMaker
的 CorrelationStrategy
、ReleaseStrategy
和 MessageGroupProcessor
的实现,作为 FileAggregator
组件。有关详细信息,请参阅 File Aggregator。
A FileSplitter.FileMaker
-based implementation of CorrelationStrategy
, ReleaseStrategy
and MessageGroupProcessor
as a FileAggregator
component was introduced.
See File Aggregator for more information.
MQTT v5 Support
Mqttv5PahoMessageDrivenChannelAdapter`和`Mqttv5PahoMessageHandler
(包括各自的`MqttHeaderMapper`)引入旨在支持MQTT v5协议通信,更多信息,请参见MQTT v5 Support。
The Mqttv5PahoMessageDrivenChannelAdapter
and Mqttv5PahoMessageHandler
(including respective MqttHeaderMapper
) were introduced to support MQTT v5 protocol communication.
See MQTT v5 Support for more information.
General Changes
所有持久 MessageGroupStore
实现在基于目标数据库流式 API 的情况下提供了 streamMessagesForGroup(Object groupId)
合约。有关详细信息,请参阅 Message Store。
All the persistent MessageGroupStore
implementation provide a streamMessagesForGroup(Object groupId)
contract based on the target database streaming API.
See Message Store for more information.
integrationGlobalProperties
bean (如果已声明)现在必须是 org.springframework.integration.context.IntegrationProperties
的实例,而不是 java.util.Properties
,该支持已弃用,以保持向后兼容性。已添加 spring.integration.channels.error.requireSubscribers=true
全局属性以指示必须使用 requireSubscribers
选项(或不使用)配置全局默认 errorChannel
。已添加 spring.integration.channels.error.ignoreFailures=true
全局属性以指示全局默认 errorChannel
必须忽略(或不忽略)调度错误并传递消息到下一个处理程序。有关详细信息,请参阅 Global Properties。
The integrationGlobalProperties
bean (if declared) must be now an instance of org.springframework.integration.context.IntegrationProperties
instead of java.util.Properties
, which support is deprecated for backward compatibility.
The spring.integration.channels.error.requireSubscribers=true
global property is added to indicate that the global default errorChannel
must be configured with the requireSubscribers
option (or not).
The spring.integration.channels.error.ignoreFailures=true
global property is added to indicate that the global default errorChannel
must ignore (or not) dispatching errors and pass the message to the next handler.
See Global Properties for more information.
AbstractPollingEndpoint
(源数据轮询信道适配器和轮训使用者)将`maxMessagesPerPoll == 0`视为跳过呼叫源数据。稍后可以将其更改为不同值,例如,通过控制总线。更多信息,请参见Polling Consumer。
An AbstractPollingEndpoint
(source polling channel adapter and polling consumer) treats maxMessagesPerPoll == 0
as to skip calling the source.
It can be changed to different value later on, e.g. via a Control Bus.
See Polling Consumer for more information.
ConsumerEndpointFactoryBean
现在接受 reactiveCustomizer
Function
作为响应流源的任何输入通道,并在其下面使用 ReactiveStreamsConsumer
。这作为 Java DSL 中的 ConsumerEndpointSpec.reactive()
选项以及消息传递注释的 @Reactive
嵌套注释得到涵盖。有关详细信息,请参阅 Reactive Streams Support。
The ConsumerEndpointFactoryBean
now accept a reactiveCustomizer
Function
to any input channel as reactive stream source and use a ReactiveStreamsConsumer
underneath.
This is covered as a ConsumerEndpointSpec.reactive()
option in Java DSL and as a @Reactive
nested annotation for the messaging annotations.
See Reactive Streams Support for more information.
现在可以将相关消息处理程序(Aggregator`和`Resequencer
)的`groupTimeoutExpression`评估为`java.util.Date`,以用于一些细粒度的调度用例。另外,在`AbstractCorrelatingMessageHandler`中添加了`BiFunction groupConditionSupplier`选项,以针对需要添加到组中的消息提供`MessageGroup`条件。更多信息,请参见Aggregator。
The groupTimeoutExpression
for a correlation message handler (an Aggregator
and Resequencer
) can now be evaluated to a java.util.Date
for some fine-grained scheduling use-cases.
Also the BiFunction groupConditionSupplier
option is added to the AbstractCorrelatingMessageHandler
to supply a MessageGroup
condition against a message to be added to the group.
See Aggregator for more information.
可以向`MessageGroup`抽象提供一个`condition`,以稍后进行评估并为该组做出决策。更多信息,请参见Message Group Condition。
The MessageGroup
abstraction can be supplied with a condition
to evaluate later on to make a decision for the group.
See Message Group Condition for more information.
Integration Flows Composition
已添加新的 IntegrationFlows.from(IntegrationFlow)
工厂方法,以允许从现有流程的输出启动当前 IntegrationFlow
。此外,IntegrationFlowDefinition
已添加 to(IntegrationFlow)
终端运算符,以在其他流程的输入通道上继续当前流程。有关详细信息,请参阅 Integration Flows Composition。
The new IntegrationFlows.from(IntegrationFlow)
factory method has been added to allow starting the current IntegrationFlow
from the output of an existing flow.
In addition, the IntegrationFlowDefinition
has added a to(IntegrationFlow)
terminal operator to continue the current flow at the input channel of some other flow.
See Integration Flows Composition for more information.
AMQP Changes
AmqpInboundChannelAdapter
和 AmqpInboundGateway
(以及相应的 Java DSL 构建器)现在支持 org.springframework.amqp.rabbit.retry.MessageRecoverer
作为通用 RecoveryCallback
的 AMQP 特定替代方案。有关详细信息,请参阅 AMQP Support。
The AmqpInboundChannelAdapter
and AmqpInboundGateway
(and the respective Java DSL builders) now support an org.springframework.amqp.rabbit.retry.MessageRecoverer
as an AMQP-specific alternative to the general purpose RecoveryCallback
.
See AMQP Support for more information.
Redis Changes
ReactiveRedisStreamMessageProducer
现在为所有 StreamReceiver.StreamReceiverOptionsBuilder
选项设置了设置器,包括 onErrorResume
函数。有关详细信息,请参阅 Redis Support。
The ReactiveRedisStreamMessageProducer
has now setters for all the StreamReceiver.StreamReceiverOptionsBuilder
options, including an onErrorResume
function.
See Redis Support for more information.
HTTP Changes
HttpRequestExecutingMessageHandler
不再返回 application/x-java-serialized-object
内容类型,并让 RestTemplate
基于所提供的 HttpMessageConverter
为请求正文转换做出最终决策。现在它还具有 extractResponseBody
标志(默认情况下为 true
),以仅返回响应正文,或将整个 ResponseEntity
作为回复消息有效负载返回,而与所提供的 expectedResponseType
无关。WebFluxRequestExecutingMessageHandler
也提供了相同的选项。有关详细信息,请参阅 HTTP Support。
The HttpRequestExecutingMessageHandler
doesn’t fallback to the application/x-java-serialized-object
content type any more and lets the RestTemplate
make the final decision for the request body conversion based on the HttpMessageConverter
provided.
It also has now an extractResponseBody
flag (which is true
by default) to return just the response body, or to return the whole ResponseEntity
as the reply message payload, independently of the provided expectedResponseType
.
Same option is presented for the WebFluxRequestExecutingMessageHandler
, too.
See HTTP Support for more information.
File/FTP/SFTP Changes
持久的过滤文件列表现在有一个布尔属性 forRecursion
。将此属性设置为 true
,还将设置 alwaysAcceptDirectories
,这意味着出站网关(ls
和 mget
)上的递归操作现在将始终在每次遍历完整目录树。这是为了解决目录树中深处更改未被检测到的问题。此外,forRecursion=true
会导致使用文件的完整路径作为元数据存储键;这解决了在不同目录中多次出现具有相同名称的文件时过滤器无法正常工作的问题。重要提示:这意味着无法在顶级目录下的文件找到持久元数据存储中的现有键。因此,该属性默认为 false
;这可能会在未来版本中更改。
The persistent file list filters now have a boolean property forRecursion
.
Setting this property to true
, also sets alwaysAcceptDirectories
, which means that the recursive operation on the outbound gateways (ls
and mget
) will now always traverse the full directory tree each time.
This is to solve a problem where changes deep in the directory tree were not detected.
In addition, forRecursion=true
causes the full path to files to be used as the metadata store keys; this solves a problem where the filter did not work properly if a file with the same name appears multiple times in different directories.
IMPORTANT: This means that existing keys in a persistent metadata store will not be found for files beneath the top level directory.
For this reason, the property is false
by default; this may change in a future release.
FileInboundChannelAdapterSpec
现在有一个便捷的 recursive(boolean)
选项,而不是要求明确引用 RecursiveDirectoryScanner
。
The FileInboundChannelAdapterSpec
has now a convenient recursive(boolean)
option instead of requiring an explicit reference to the RecursiveDirectoryScanner
.
现在可以在 mv
命令中使用 remoteDirectoryExpression
以便于使用。
The remoteDirectoryExpression
can now be used in the mv
command for convenience.
MongoDb Changes
MongoDbMessageSourceSpec
已添加到 MongoDd Java DSL,现在 MongoDbMessageSource
和 ReactiveMongoDbMessageSource
实现中公开了 update
选项。
The MongoDbMessageSourceSpec
was added into MongoDd Java DSL.
An update
option is now exposed on both the MongoDbMessageSource
and ReactiveMongoDbMessageSource
implementations.
有关详细信息,请参阅 MongoDb Support。
See MongoDb Support for more information.
WebSockets Changes
现在可以在运行时注册和移除基于 ServerWebSocketContainer
的 WebSocket 通道适配器。
The WebSocket channel adapters based on ServerWebSocketContainer
can now be registered and removed at runtime.
有关详细信息,请参阅 WebSockets Support。
See WebSockets Support for more information.
JPA Changes
JpaOutboundGateway
现在支持 PersistMode.DELETE
的 Iterable
消息有效负载。
The JpaOutboundGateway
now supports an Iterable
message payload for a PersistMode.DELETE
.
有关详细信息,请参阅 Outbound Channel Adapter。
See Outbound Channel Adapter for more information.
Gateway Changes
以前,在使用XML配置时,对无参数的方法忽略`@Gateway.payloadExpression`。一种可能的重大更改是,如果方法注释了`@Payload`以及`@Gateway`(具有不同的表达式),那么以前将使用`@Payload`,现在使用`@Gateway.payloadExpression`。更多信息,请参见Gateway Configuration with Annotations and XML和Invoking No-Argument Methods。
Previously, when using XML configuration, @Gateway.payloadExpression
was ignored for no-argument methods.
There is one possible breaking change - if the method is annotated with @Payload
as well as @Gateway
(with a different expression) previously, the @Payload
would be applied, now the @Gateway.payloadExpression
is applied.
See Gateway Configuration with Annotations and XML and Invoking No-Argument Methods for more information.