我正在我的系统中尝试同样的实现 Maven Spring Boot
+ Kafka
申请 Producer
在发送数据之后 Azure Matrix
但提到的错误我得到的错误:
2019-07-04 12:27:31.729 INFO 92607 --- [nio-8050-exec-2] c.g.k.service.KafkaPublisherService : sending message='t'
2019-07-04 12:28:31.730 ERROR 92607 --- [nio-8050-exec-2] o.s.k.support.LoggingProducerListener : Exception thrown when sending a message with key='null' and payload='Hi' to topic testhub:
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
对于消费者来说,我得到了以下提到的错误:
2019-07-04 12:48:26.837 WARN 94752 --- [main] o.s.w.c.s.GenericWebApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException:
Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
kafka:引导服务器:myeventhubname.servicebus.windows。net:9093 client-id:kafkaconsumer properties:sasl.jaas.config:org.apache.kafka.common.security.plain.plainloginmodule所需用户名=“$connectionstring”密码=“myeventhubname key”sasl.mechanism:plain security.protocol:sasl\u ssl consumer:group id:testhubconsumer属性:spring.json:use.type.headers:false#value.default.type:com.protonforest.kafkademo.consumer.consumermessage主题:订户:testhub
kafka:引导服务器:myeventhubname.servicebus.windows。net:9093 #client-id:kafkapublisher属性:sasl.jaas.config:org.apache.kafka.common.security.plain.plainloginmodule所需用户名=“$connectionstring”密码=“myeventhubname密钥”sasl.mechanism:plain security.protocol:sasl\u ssl模板:默认主题:testhub生产者:值序列化程序:com.protonforest.kafkademo.publisher.producermessageserializer
暂无答案!
目前还没有任何答案,快来回答吧!