简体   繁体   English

Spring Cloud Stream Kafka Binder and Spring Cloud Azure EventHub compatible version for Spring Boot >1.5.20

[英]Spring Cloud Stream Kafka Binder and Spring Cloud Azure EventHub compatible version for Spring Boot >1.5.20

I have successfully used Spring Cloud Stream Kafka Binder (org.springframework.cloud:spring-cloud-starter-stream-kafka:3.0.1.RELEASE) and Spring Cloud Azure Event Hubs (com.microsoft.azure:spring-cloud-starter-azure-eventhubs:1.2.3) with Spring Boot 2.2.6 to Publish and Consume messages from Azure Event Hub (with Kafka API enabled). I have successfully used Spring Cloud Stream Kafka Binder (org.springframework.cloud:spring-cloud-starter-stream-kafka:3.0.1.RELEASE) and Spring Cloud Azure Event Hubs (com.microsoft.azure:spring-cloud-starter -azure-eventhubs:1.2.3) 与 Spring 启动 2.2.6 以发布和使用来自 Azure 事件中心的消息(启用 Kafka ZDB974238714CA8DE634A7CE1D083A1)。

However, when i try to integrate the same versions of the Spring Cloud libraries with Spring Boot 1.5.22, I am facing the issue java.lang.NoClassDefFoundError: org/springframework/integration/support/converter/ConfigurableCompositeMessageConverter However, when i try to integrate the same versions of the Spring Cloud libraries with Spring Boot 1.5.22, I am facing the issue java.lang.NoClassDefFoundError: org/springframework/integration/support/converter/ConfigurableCompositeMessageConverter

When i used spring-cloud-starter-stream-kafka:1.3.4.RELEASE and com.microsoft.azure:spring-cloud-starter-azure-eventhubs:1.1.0, I am getting zookeeper connection issues probably due to a different set of properties needed for configuration当我使用 spring-cloud-starter-stream-kafka:1.3.4.RELEASE 和 com.microsoft.azure:spring-cloud-starter-azure-eventhubs:1.1.0 时,我收到 zookeeper 连接问题可能是由于不同的配置所需的一组属性

2020-04-29 17:01:43.104  INFO 81976 --- [localhost:2181)] [org.apache.zookeeper.ClientCnxn         ] [-] [-] : Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-04-29 17:01:43.107  WARN 81976 --- [localhost:2181)] [org.apache.zookeeper.ClientCnxn         ] [-] [-] : Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

    java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)

My application.yaml looks like below我的 application.yaml 如下所示

spring:
  cloud:
    azure:
      auto-create-resources: true
      credential-file-path: my.azureauth
      eventhub:
        checkpoint-storage-account: azuremigrationv2
        namespace: somenamespace
      region: Central US
      resource-group: some-rg
    stream:
      bindings:
        consumer:
          destination: event-hub-1
          group: testconsumergroup
          content-type: application/json
          nativeEncoding: true
          consumer:
            concurrency: 1
            valueSerde: JsonSerde
            requeue-rejected: true

I would like to know which versions of the libraries i am using are compatible with Spring Boot >= 1.5.20我想知道我使用的哪些版本的库与 Spring Boot >= 1.5.20 兼容

My understanding is that config properties within spring.cloud.azure are for the dependency azure-spring-cloud-starter-eventhubs and the config properties within spring.cloud.stream are for use with azure-spring-cloud-stream-binder-eventhubs . My understanding is that config properties within spring.cloud.azure are for the dependency azure-spring-cloud-starter-eventhubs and the config properties within spring.cloud.stream are for use with azure-spring-cloud-stream-binder-eventhubs . I could be wrong about this but I think it is correct.我可能错了,但我认为这是正确的。 There is no good documentation on it that I could find and it makes things quite confusing if you don't know the difference.我找不到很好的文档,如果您不知道其中的区别,这会使事情变得非常混乱。 It caused me to waste a day or two doing POCs until I started understanding it.它让我浪费了一两天时间做 POC,直到我开始理解它。

NOTE: When configuring binders, spring.cloud.stream contains spring.cloud.azure subkeys.注意:配置活页夹时, spring.cloud.stream包含spring.cloud.azure子密钥Link 关联

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 空指针:带有活页夹 kafka 的 Spring Cloud 流 - Null pointer: Spring cloud stream with binder kafka Spring Cloud 版本兼容 Spring Boot 2.5.5 - Spring Cloud Version compatible for Spring Boot 2.5.5 Spring 使用 Spring 云启动应用程序 Stream Kafka Binder + Kafka Streams Binder 不工作 - 生产者不发送消息 - Spring Boot application using the Spring Cloud Stream Kafka Binder + Kafka Streams Binder not working - Producer doesn't send messages Spring 启动 Apache kafka binder 项目,application.properties spring.cloud.stream.kafka.binder。 jaas 属性未知 - Spring boot Apache kafka binder project, application.properties spring.cloud.stream.kafka.binder. jaas properties are unknown spring-cloud-stream-binder-kafka 和 spring-cloud-starter-stream-kafka 的区别 - Difference between spring-cloud-stream-binder-kafka and spring-cloud-starter-stream-kafka 无法配置 spring 云 stream Kafka Binder 连接到代理 - unable to configure spring cloud stream Kafka Binder to connect to broker Spring Cloud Stream-初始化Kafka活页夹时的通知 - Spring cloud stream - notification when Kafka binder is initialized spring 云 stream kafka binder enableDlq 未按预期工作 - spring cloud stream kafka binder enableDlq is not working as I expected 相当于 Spring Cloud Stream Kafka Streams Binder 的 ChannelInterceptor - Equivalent to ChannelInterceptor for Spring Cloud Stream Kafka Streams Binder Spring Spring 云 stream 的安全性与 Z7EAA993723E57B3BFC99923C196E2E7 - Spring Security for Spring cloud stream with RabbitMQ as binder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM