Hi,
Is it possible to enable idempotent producing in MirrorMaker?
By code examples, I've seen this needs to be explicitly enabled via the
producer API by sending a 'initTransactions' method:
https://github.com/omkreddy/kafka-examples/blob/master/producer/src/main/java/kafka/examples/producer/TransactionalProducerExample.java#L63
My Producer config:
----------------------------------
compression.type=gzip
acks=all
enable.idempotence=true
transactional.id=mm-1-test
client.id=transactional-producer
retries=3
max.in.flight.requests.per.connection=1
When I start MM, I get the following exception indicating I'm trying to produce
before sending initTransaction:
Exception:
-----------------------
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:285)
at
org.apache.kafka.clients.producer.internals.TransactionManager.maybeAddPartitionToTransaction(TransactionManager.java:265)
at
org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:899)
at
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:840)
at kafka.tools.ConsoleProducer$.send(ConsoleProducer.scala:74)
at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:56)
at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)
Same applies for console producer.