In flink 1.14 how can I have a single sink which both writes to kafka and some other data source.
I’ve tried creating a custom sink which extends the RichSinkFunction
. In the open
method, I’ve also initialised a KafkaSink
.
However KafkaSink
has no equivalent of invoke
method which I can call in the invoke
method of my own custom sink.
The documentation says the usage of KafkaSink
is as – stream.sinkTo(kafakSink)
That approach wouldn’t work for me because in the sink, I make a decision of whether to write to kafka or not.