**Spring Integration Extensions Releases** 是 Spring Integration 框架的扩展模块

SpringIntegration多个扩展项目如SMB、Cassandra、Hazelcast、KotlinDSL和Kafka等已更新至最新版本,改进了功能并提高了与SpringIntegration和其他框架的兼容性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Spring Integration Extensions Releases 是 Spring Integration 框架的扩展模块,旨在为特定的集成场景提供额外的功能和适配支持。这些扩展模块通常针对特定的技术或协议(如 Kafka、AMQP、FTP 等)进行优化,帮助开发者更高效地实现复杂的集成需求。以下是关于 Spring Integration Extensions 的详细介绍:


1. 核心功能

Spring Integration Extensions 提供了以下核心功能:

  • 特定技术适配:为 Kafka、AMQP、FTP、JDBC 等技术提供专门的适配器和组件。
  • 简化集成开发:通过预定义的组件和配置,减少开发者在集成场景中的工作量。
  • 与 Spring Integration 无缝集成:扩展模块与 Spring Integration 核心框架完全兼容,支持统一的消息处理模型。

2. 主要扩展模块

以下是一些常见的 Spring Integration Extensions 模块:

  1. Spring Integration Kafka

    • 提供 Kafka 生产者和消费者的适配器,支持消息的发布和订阅。
    • 支持 Kafka Streams 集成,实现流式处理。
    • 提供事务管理和错误处理机制。
  2. Spring Integration AMQP

    • 支持 RabbitMQ 和其他 AMQP 协议的消息中间件。
    • 提供消息通道、路由和事务管理功能。
  3. Spring Integration FTP/SFTP

    • 支持文件传输协议(FTP)和安全文件传输协议(SFTP)。
    • 提供文件监听、上传、下载和错误处理功能。
  4. Spring Integration JDBC

    • 支持通过 JDBC 与数据库进行集成。
    • 提供消息存储、查询和事务管理功能。
  5. Spring Integration HTTP

    • 支持 HTTP 和 HTTPS 协议的集成。
    • 提供请求/响应处理、负载均衡和错误处理功能。

3. 使用场景

Spring Integration Extensions 适用于以下场景:

  • 消息驱动架构:通过 Kafka 或 AMQP 实现异步消息处理。
  • 文件传输:通过 FTP/SFTP 实现文件的上传和下载。
  • 数据库集成:通过 JDBC 实现数据库操作和消息存储。
  • 实时通信:通过 HTTP/WebSocket 实现实时数据传输。

4. 快速入门

4.1 添加依赖

在 Maven 项目中添加 Spring Integration Kafka 扩展的依赖:

<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-kafka</artifactId>
    <version>6.0.0</version>
</dependency>
4.2 配置 Kafka 适配器

application.yml 中配置 Kafka 适配器:

spring:
  kafka:
    bootstrap-servers: localhost:9092
  integration:
    kafka:
      producer:
        topic: myTopic
4.3 定义消息通道

使用 Spring Integration DSL 定义消息通道:

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.dsl.IntegrationFlow;
import org.springframework.integration.dsl.IntegrationFlows;
import org.springframework.integration.kafka.dsl.Kafka;

@Configuration
public class KafkaIntegrationConfig {

    @Bean
    public IntegrationFlow kafkaFlow() {
        return IntegrationFlows.from("inputChannel")
                .handle(Kafka.outboundChannelAdapter(kafkaTemplate()))
                .get();
    }
}

5. 总结

Spring Integration Extensions 是 Spring Integration 框架的重要组成部分,为特定的集成场景提供了强大的功能和适配支持。通过使用这些扩展模块,开发者可以更高效地实现复杂的集成需求,同时保持与 Spring 生态系统的无缝集成。如果需要更详细的使用指南或示例代码,可以参考 Spring Integration 官方文档 和相关资源。

如果需要进一步了解其技术细节或实践案例,可以参考以下资源:

Spring Integration Extensions 最新版本及更新日志

最新版本

根据最新的搜索结果,以下是 Spring Integration Extensions 的一些关键版本和更新内容:

  1. Spring Integration 6.1.0-M2

    • 发布日期:2023年3月23日
    • 主要内容
      • 升级到最新依赖项。
      • 添加了 Protobuf 变换器支持。
      • 将 Zip 扩展迁移到核心项目中的相应模块。
      • MessageFilter 现在在丢弃请求消息时会发出 WARN 日志。
      • 网关和回复处理程序不会永远阻塞发送和接收操作,框架中的默认超时设置为 30 秒。
  2. Spring Integration 6.0.0-M5

    • 发布日期:2022年9月21日
    • 主要内容
      • 支持 Spring AOT。
      • 添加了 GraphQL 支持。
      • MQTT 模块现在提供了一个 ClientManager 抽象。
      • 引入了 PostgresSubscribableChannel
      • 添加了 Micrometer 可观测性。
      • 添加了对 Apache Camel 的支持。
  3. Spring Integration 5.5.17、6.0.4

    • 发布日期:2023年3月23日
    • 主要内容
      • 包含错误修复和依赖项升级。
其他相关版本
  • Spring Integration 5.4.0

    • 发布日期:2020年11月2日
    • 主要内容
      • R2DBC 通道适配器。
      • Redis Streams 通道适配器。
      • spring-integration-kafka 扩展已迁移到核心项目。
  • Spring Integration 5.3.3.RELEASE

    • 发布日期:2020年11月2日
    • 主要内容
      • 包含错误修复和依赖项升级。
如何获取最新版本
  • Spring Integration 6.1.0-M2 可以从 Spring Milestone 仓库获取。
  • Spring Integration 6.0.0-M5 可以从 Spring Milestone 仓库获取。
  • Spring Integration 5.5.176.0.4 可以从 Maven Central 获取。
官方文档和更多资源

如果您需要更详细的更新日志或特定版本的信息,请参考上述链接或相关文档。

Following several requests from community members, it is my pleasure to announce that some Spring Integration Extensions have made it to their new generations and up-to-date dependencies. Of course, first of all, thank you everybody contributed, even if that was just a GitHub issue or StackOverflow question!

Below are highlights for those projects. All of them are available on Maven Central, JCenter and Spring Release repositories. Since all these projects are not a part of Spring Integration BOM (and they cannot be because of different release cycles) you have to specify their versions in your dependency management explicitly.
Spring Integration SMB

Spring Integration support for Server Message Block has reached version 1.2.0.RELEASE and is based on Spring Integration 5.2.1.RELEASE and JCIFS 2.1.11. Besides upgrades we also have a community contributed ability to use a custom implementation of the jcifs.CIFSContext interface in the SmbSessionFactory. The dependency for this artifact is this:

org.springframework.integration:spring-integration-smb:1.2.0.RELEASE

Spring Integration Cassandra

Spring Integration support for Apache Cassandra has reached version 0.7.0.RELEASE and is based on Spring Integration 5.2.1.RELEASE and Spring Data Moore-SR1. Besides upgrades the CassandraMessageHandler implementation is fully reactive and produces a Mono reply in the async and gateway modes. Otherwise a subscription or block() happens internally if not an async or we are not interested in the reply. The dependency for this artifact is this:

org.springframework.integration:spring-integration-cassandra:0.7.0.RELEASE

Spring Integration Hazelcast

Spring Integration support for Hazelcast has reached version 2.0.0.RELEASE and is based on Spring Integration 5.2.1.RELEASE and Hazelcast 3.12.4. With this major new version we have reworked some internals for latest Hazelcast and Spring Integration compatibilities. The dependency for this artifact is this:

org.springframework.integration:spring-integration-hazelcast:2.0.0.RELEASE

Spring Integration Kotlin DSL

Spring Integration Kotlin DSL has been changed radically and released as 0.0.2.RELEASE version. It is based on Spring Integration 5.2.1.RELEASE & Kotlin 1.3.50. With a KotlinIntegrationFlowDefinition implementation & @BuilderInference marker for it lambda in the integrationFlow() global functions makes the target integration flow definitions much cleaner and Kotlin-friendly:

@Bean
fun flowLambda() =
integrationFlow {
filter({ it === “test” })
wireTap(
integrationFlow {
handle { m -> println(m.payload) }
})
transform<String, String>({ it.toUpperCase() })
}

The dependency for this artifact is this:

org.springframework.integration:spring-integration-kotlin-dsl:0.0.2.RELEASE

Spring Integration Kafka

Spring Integration support for Apache Kafka was also released as version 3.2.1.RELEASE with all the latest Spring Integration and Spring for Apache Kafka releases. A ProducerRecordCreator strategy can now be injected into the KafkaProducerMessageHandler for custom ProducerRecord creating respectively. As well as ProducerRecord can come now in the request message payload. A dependency for this artifact is this:

org.springframework.integration:spring-integration-kafka:3.2.1.RELEASE

As always, we are open for any feedback in any communication channels available!

在收到社区成员的几次请求后,我很高兴地宣布,一些Spring Integration Extensions已适应了其新一代产品和最新的依赖关系。当然,首先,谢谢大家的贡献,即使那只是一个GitHub问题或StackOverflow问题!

以下是这些项目的重点。它们都可以在Maven Central,JCenter和Spring Release存储库中找到。由于所有这些项目都不是Spring Integration BOM的一部分(它们不可能是由于发布周期不同),因此您必须在依赖项管理中明确指定其版本。
Spring Integration SMB

Spring Integration对服务器消息块的支持已达到1.2.0.RELEASE版本,并基于Spring Integration 5.2.1.RELEASE和JCIFS 2.1.11。除了升级,我们还具有社区贡献的能力,可以在SmbSessionFactory中使用jcifs.CIFSContext接口的自定义实现。此工件的依赖关系是这样的:

org.springframework.integration:spring-integration-smb:1.2.0.RELEASE

Spring Integration卡桑德拉

对Apache Cassandra的Spring Integration支持已达到版本0.7.0.RELEASE,并基于Spring Integration 5.2.1.RELEASE和Spring Data Moore-SR1。除了升级外,CassandraMessageHandler实现是完全反应性的,并在异步和网关模式下生成Mono 答复。否则,如果不是异步,则订阅或block()在内部发生,或者我们对回复不感兴趣。此工件的依赖关系是:

org.springframework.integration:spring-integration-cassandra:0.7.0.RELEASE

春季整合Hazelcast

对Hazelcast的Spring Integration支持已达到2.0.0.RELEASE版本,并基于Spring Integration 5.2.1.RELEASE和Hazelcast 3.12.4。通过这个主要的新版本,我们重新设计了一些内部组件,以实现最新的Hazelcast和Spring Integration兼容性。此工件的依赖关系是:

org.springframework.integration:spring-integration-hazelcast:2.0.0.RELEASE

Spring Integration Kotlin DSL
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Bol5261

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值