Re: Side output from Flink Sink

2019-11-28 Thread Robert Metzger
What do you mean by "from within a sink"? Do you have a custom sink? If you want to write to different Kafka topics from the same sink, you can do that using a custom KafkaSerializationSchema. It allows you to return a ProducerRecord with a custom target topic set. (A Kafka sink can write to

Re: Side output from Flink Sink

2019-11-28 Thread Arvid Heise
Hi Victor, you could implement your own SinkFunction that wraps the KafkaProducer. However, since you may need to check if the write operation is successful, you probably need to subclass KafkaProducer and implement your own error handling. Best, Arvid On Mon, Nov 25, 2019 at 7:51 AM vino yang

Re: Side output from Flink Sink

2019-11-24 Thread vino yang
Hi Victor, Currently, it seems the "side output" feature does not been supported by the streaming sink. IMO, you can customize your sink via selecting different types of events to output to different places. WDYT? Best, Vino Victor Villa Dev 于2019年11月25日周一 下午1:37写道: > Hi Vino, > > Thanks a

Re: Side output from Flink Sink

2019-11-24 Thread vino yang
Hi Victor, Firstly, you can get your side output stream via OutputTag. Please refer to the official documentation[1]. Then, specify a sink for your side output stream. Of course, you can specify a Kafka sink. Best, Vino [1]:

Side output from Flink Sink

2019-11-24 Thread Victor Villa Dev
I'd like know if there's a way to generate a side output and/or sink to an alternate kafka topic from within a Sink? The use case is the datastream sinks to a storage and on particular failed attempts I'd like to deadletter to a kafka topic. Any suggestions? Thanks