You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Dominik Safaric <do...@gmail.com> on 2016/10/31 22:41:27 UTC

Modify Message payload before KafkaApis returns

Dear all,

currently we are in the processing of benchmarking several stream processing engines (including but not limited to Kafka Streams, Spark, Flink), and as such, we require a change to the source code of Kafka used as the input data source. 

Namely, we want to mutate the message payload prior of returning from the KafkaApis function handleFetchRequest by appending a 8 byte value to it. This value cannot be stored within the log itself because of certain threads to the overall results. For illustrative purposes consider the example of having a log message payload of total size equal to 100 bytes. Once a consumer would send a fetch request, and prior of returning the intermediate messages, each of the message byte array has to be extended with this 8 byte value producing a message payload of total 108 bytes.  

I would really appreciate if you could provide me with some details onto the exact source code fragment which needs to be changed to accomplish this.

Kind regards,
Dominik Safaric 

—
Dominik Safaric | External researcher
TU/Delft | www.tudelft.nl