reactor/reactor-kafka

Cannot add partition topic to transaction while in state READY

yangwenliang123 opened this issue · 1 comments

spring.kafka.producer.properties.transactional.id=im_group
I opened the Kafka transaction. use reactiveKafkaProducerTemplate.send() API appearing exception: Cannot add partition topic to transaction while in state READY. opening a transaction can only be used reactiveKafkaProducerTemplate.sendTransactionally() API?

spring.kafka.producer.properties.transactional.id

This is a Spring Boot property for Spring for Apache Kafka, it has nothing to do with this project.

To enable transactions in reactor-kafka, set the ProducerConfig.TRANSACTIONAL_ID_CONFIG property (transactional.id) passed into the

/**
* Creates a sender options instance with the specified config overrides for the underlying
* Kafka {@link Producer}.
* @return new instance of sender options
*/
@NonNull
static <K, V> SenderOptions<K, V> create(@NonNull Map<String, Object> configProperties) {

when creating the SenderOptions. But you still need to use sendTransactionally().