如何将 Apache Pulsar 与 Spring Cloud Stream 结合使用?

use*_*598 3 spring-cloud-stream apache-pulsar spring-pulsar

Apache Pulsar 没有适用于 Spring Cloud Stream 的官方库。我找到了Spring for Apache Pulsar,但它仅与 Spring Boot 有关。在它的 GitHub 存储库中,有一个 [spring-pulsar-spring-cloud-stream-binder],但在 mvnrepository 中找不到。那么我该如何使用它呢?

有没有在 Spring Cloud Stream 中集成 Apache Pulsar 的好方法?

小智 5

Spring for Apache Pulsar 项目的 Spring Cloud Stream 绑定器尚未发布。它很可能是下一个版本的一部分。如果你等不及了,也许你可以从主 git 分支构建它?

  • 它是官方的 SCS 库。它尚未出现在 Maven Central 上,但您可以按照[此处](https://docs.spring.io/spring-pulsar/docs/current-SNAPSHOT/reference/html/#appendix.non-ga-版本)。 (2认同)
  • 在参考文档更新为 SCS 信息之前,您可以使用[此示例](https://github.com/spring-projects-experimental/spring-pulsar/tree/main/spring-pulsar-sample-apps/ Sample-pulsar-binder)和[测试](https://github.com/spring-projects-experimental/spring-pulsar/blob/main/spring-pulsar-spring-cloud-stream-binder/src/test/ java/org/springframework/pulsar/spring/cloud/stream/binder/PulsarBinderIntegrationTests.java)。 (2认同)