Spring Integration 6.3.0-M2、6.2.3 和 6.1.7 现已发布

Spring Integration 6.3.0-M2、6.2.3 和 6.1.7 现已发布

💡 原文英文,约300词,阅读约需1分钟。
📝

内容提要

Spring Integration 6.3.0-M2、6.2.3 和 6.1.7 现已发布。值得注意的变化包括与 Kotlin 2.0 的兼容性、移除 spring-integration-security 模块、弃用 ObservationPropagationChannelInterceptor,以及对 MessageHistory 头的改进。其他更新包括新的配置选项和错误修复。

🎯

关键要点

  • Spring Integration 6.3.0-M2、6.2.3 和 6.1.7 现已发布。

  • Kotlin DSL 现在与即将发布的 Kotlin 2.0 兼容。

  • 移除了 spring-integration-security 模块,改为使用 SecurityContextChannelInterceptor 和 SecurityContextPropagationChannelInterceptor。

  • ObservationPropagationChannelInterceptor 已被弃用,因为它无法在线程之间或持久存储中正确传递观察状态。

  • 现在需要在 MessageChannel 和相应的 MessageHandler 上启用观察,以通过消息头传播追踪信息。

  • MessageHistory 头现在是可变的,提高了性能,避免每次跟踪时创建新消息。

  • 基于 UnicastingDispatcher 的 MessageChannel 实现现在可以配置 Predicate<Exception> failoverStrategy,以动态决定异常处理。

  • Mqttv5PahoMessageDrivenChannelAdapter 现在使用订阅标识符支持共享订阅。

  • 新增 MockIntegrationContext.substituteTriggerFor() API,便于在测试模块中调整基于时间的配置。

延伸问答

Spring Integration 6.3.0-M2 版本有哪些重要变化?

6.3.0-M2 版本的主要变化包括与 Kotlin 2.0 的兼容性、移除 spring-integration-security 模块、弃用 ObservationPropagationChannelInterceptor,以及对 MessageHistory 头的改进。

为什么 ObservationPropagationChannelInterceptor 被弃用?

ObservationPropagationChannelInterceptor 被弃用是因为它无法在线程之间或持久存储中正确传递观察状态。

如何在 Spring Integration 中启用观察?

观察需要在 MessageChannel 和相应的 MessageHandler 上启用,以通过消息头传播追踪信息。

MessageHistory 头的改进带来了什么好处?

MessageHistory 头现在是可变的,这提高了性能,避免了每次跟踪时创建新消息的开销。

新版本中如何处理异常?

基于 UnicastingDispatcher 的 MessageChannel 实现现在可以配置 Predicate<Exception> failoverStrategy,以动态决定异常处理。

Mqttv5PahoMessageDrivenChannelAdapter 有什么新特性?

Mqttv5PahoMessageDrivenChannelAdapter 现在使用订阅标识符来支持共享订阅。

🏷️

标签

➡️

继续阅读