Hi,
I’m trying to test the new exactly once transaction feature. Doing simple test
like:
/opt/kafka/bin/kafka-console-producer.sh --request-required-acks "all"
--producer-property "transactional.id=777"
--producer-property="enable.idempotence=true" --broker-list broker1:9092
--topic bla
Fails with:
java.lang.IllegalStateException: Cannot perform a 'send' before completing a
call to initTransactions when transactions are enabled.
at
org.apache.kafka.clients.producer.internals.TransactionManager.failIfNotReadyForSend(TransactionManager.java:253)
at
org.apache.kafka.clients.producer.internals.TransactionManager.maybeAddPartitionToTransaction(TransactionManager.java:233)
at
org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:745)
at
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:701)
at kafka.producer.NewShinyProducer.send(BaseProducer.scala:47)
at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:61)
at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)
I suspect that somehow the producer is not able to trigger the creation of the
internal transaction topic ?
BR,
Marcin