Might be a dumb question, but I can't find an answ...
# random
d
Might be a dumb question, but I can't find an answer in the docs - is there a standard way to handle exceptions in sources? Let's say I'm providing some sort of deserialization schema and a message does not conform - what's a good way to handle that (I want to have some exception output and not just silently ignore exceptions). I can think of a source emitting an
org.apache.flink.types.Either<ExpectedType, ExceptionType>
and then split the output (in a process function), but is there any design for directly providing second output in sources?
d
Good question. And no, there’s no way to do that. You’ll have to have the source produce something like a byte array, and do the deserialization downstream in a process function.
d
@David Anderson thanks, that's what I've been doing, just thought there must be a simpler way
Overwhelmed these days, but might experiment with adding something when I have some time