Kafka Transactional Producer

Hi,

Does Kafka Alpakka supports out of the box transactional producer, I mean like transaction on Producer part only where transactions are committed such as this

producer.initTransactions();
try {
producer.beginTransaction();
producer.send(record1);
producer.send(record2);
producer.commitTransaction();
} catch(ProducerFencedException e) {
producer.close();
} catch(KafkaException e) {
producer.abortTransaction();
}

or I should be the one to explicitly putting this

Hi @cheatmenot,

No, Alpakka Kafka does only support transactions in a consume-transform-produce workflow.
To achieve this you need to use the Kafka producer API directly.

Cheers,
Enno.

A little late, but i was wondering if you could elaborate on that a little just for help. What i mean is, are saying you should drop using alpakka for this ?

Do you have any recommendation? We have already quite a stream set up that has been there for while, and right now we would like to add transaction, does that mean we need to drop akka stream entirely ?
Are they been some attempt to implement a graphstage for this ? What would be your advise if one wants to not completely drop from akka stream entirely ?