【发布时间】:2020-07-08 15:54:08
【问题描述】:
我正在使用 micronaut kafka 来设置我的制作人。我正在使用 @KafkaClient 注释来设置所有生产者配置 Micronaut kafka 使我能够设置所有参数来设置事务生产者。 当我推送消息时,我得到一个异常提示
io.micronaut.messaging.exceptions.MessagingClientException: Exception sending producer record: Cannot perform 'send' before completing a call to initTransactions when transactions are enabled.
参考 mirconaut 文档 section 看起来它要求您使用 KafkaProducer API 来实现此功能。
据我所知,需要在开始事务之前调用 KafkaProducer.initTransactions() 方法,并且看起来并没有发生。
有没有人在实现这个时遇到过类似的问题?
【问题讨论】: