[英]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.