Spring boot 无法推进卡夫卡,甚至回拨也不会执行

Spring boot 无法推进卡夫卡,甚至回拨也不会执行,spring-boot,apache-kafka,spring-kafka,Spring Boot,Apache Kafka,Spring Kafka,我需要将我的微服务的请求和响应推送到卡夫卡代理 我可以用本地设置的卡夫卡成功地完成它。但是当我把它带到更高的环境中时,它失败了,错误如下 o.a.k.clients.producer.KafkaProducer: [Producer clientId=producer-9] Closing the Kafka producer with timeoutMillis = 0 ms.", "source":"stdout", "tag":"PromiseEngine-Staging-aafa49a1

我需要将我的微服务的请求和响应推送到卡夫卡代理

我可以用本地设置的卡夫卡成功地完成它。但是当我把它带到更高的环境中时,它失败了,错误如下

o.a.k.clients.producer.KafkaProducer: [Producer clientId=producer-9]
Closing the Kafka producer with
timeoutMillis = 0 ms.",
"source":"stdout",
"tag":"PromiseEngine-Staging-aafa49a1ea22"}
我没有将超时设置为零,我可以在producer配置中看到超时为30000毫秒

我还实现了成功和失败回调,但没有一个得到执行


@自动连线
卡夫卡坦普尔卡夫卡坦普尔;
private void PublishTokafakatopic(字符串主题,
SchedulingCallRequestDTO请求,ScheduleOrderResponseDTOv2响应){
debug(“输入publishTokafatopic:+CommonUtils.getJson(响应));
可上市的未来=
发送(主题,新卡夫卡姆信使(请求,响应));
future.addCallback(
新建ListenableFutureCallback(){
@凌驾
成功时公共无效(SendResult结果){
log.info(“推送到卡夫卡的eRequest和响应:”+
getJson(result.getProducerRecord().value());
}
@凌驾
失效时的公共无效(可丢弃的ex){
log.error(“推到卡夫卡时出错。”+“{}”,
getJson(新的KafkaMessageDTO(请求、响应));
}
});
}
private ListenableFuture发送(字符串主题,KafkaMessageDTO消息){
log.debug(“输入send:+CommonUtils.getJson(message));
ListenableFuture future=kafkaTemplate
.send(generateProducerRecord(主题、消息));
回归未来;
}

有人能帮我做这个吗

你能为kafka producer send方法添加代码吗,我已经添加了send方法代码。我不是在创建kafka producer。我只是通过我的属性文件在Kafkatemplate内为producer提供引导服务器、序列化程序和反序列化程序@阿索兰基