LGouellec / kafka-streams-dotnet

.NET Stream Processing Library for Apache Kafka 🚀
https://lgouellec.github.io/kafka-streams-dotnet/
MIT License
453 stars 73 forks source link

Add support for ProcessorContext.Forward(...) #201

Closed duke-bartholomew closed 1 year ago

duke-bartholomew commented 1 year ago

A bit related to: #199 Assume we have punctuators that generate messages that need to go through the processing pipeline, in this case we're outside of the Process(..) method in the Transformer and need a way to feed data through the pipeline. In come the Forward methods:

  void Forward(K, V);
  void Forward(K, V, To);

Directly forwarding on the ProcessorContext might also come in handy when e.g. the transformation function (Process) generates not 1, but multiple messages that need the processed further. In that case we can simply pass each message individually through the pipeline without the need to explicitly model a List or something as output of the transformer.

Choc13 commented 1 year ago

Hi, I just started using this project and came across a need to write my own Transformer that would output multiple events, so believe I need this feature. I see the PR is merged and the code is scheduled for the 1.5.0 release. Just wondering if you had a rough timeline on that version? Thanks.

LGouellec commented 1 year ago

Hi @Choc13 ,

End Q2'23 : https://github.com/LGouellec/kafka-streams-dotnet/milestone/4