Reply
New Contributor
Posts: 2
Registered: ‎12-30-2015

Transaction Management on Kakfa Messages on Kafka Topics

Hi All,

 

I have a scenario where I need to transfer file data over Apache Kafka Queue.

 

Problem Statement:

If I get a big file then the file is split into multiple chunks and each chunk is sent over KAFKA topic. It is all good if all the messages are sent to kafka and processed from topic.

 

But, say I have split the file into 10 chunks and after sending 6 out of 10 chunks, there is some issue and I am not able to send next 4. In case of resend of file, it is again split into 10 chunks and earlier sent 6 blocks are resend making it duplicate.

 

Having said do we have any transaction management in Apache Kafka, where if I am not able to send all chunks ,whatever chunks sent earlier before commit has to be discarded from kafka  queue.

 

Any help will be of great help. 

 

 

Highlighted
Expert Contributor
Posts: 101
Registered: ‎01-24-2014

Re: Transaction Management on Kakfa Messages on Kafka Topics

It sounds like you are asking for transaction management for a group of kafka transactions. That would be up to you to write currently, as Kafka would only guarantee each individual message would be delivered at least once. see here for more information[1]  you are correct in that each of the 10 messages (piece of the original file in your example) would be delivered at least once, but could be delivered multiple times, and it sounds like you have additional logic ontop of that, that would deliver the file pieces again should it get interrupted. 

 

[1]https://cwiki.apache.org/confluence/display/KAFKA/Transactional+Messaging+in+Kafka

Announcements