> but this serves as a handler for all errors happening
>> within a stream
This is not correct. The `default.deserialization.exception.handler` is
only used when an exception occurs during deserialization (as the name
indicates).
To handled deserialization or serialization errors, you might want to
provide a custom handler. Cf.
https://docs.confluent.io/current/streams/faq.html#option-3-quarantine-corrupted-records-dead-letter-queue
Using try-catch in your processing logic does make sense to handle
exception and avoid dying. Using the DSL, you will need some flag to use
branch() though. It should be possible to wrap the actual data with a
simple POJO type with two fields: (1) holding the actual data and (2)
indicating success/error during processing. After branching you can
remove the wrapper and extract the actual data again.
For the uncaught exception handler: it is called after the thread died;
ie, it's to late to continue processing, as the handler is called after
the fact.
Hope this helps.
-Matthias
On 8/31/18 10:58 AM, Sriram KS wrote:
> My bad, i tried this but its not capturing all Exceptions.
>
> I see in StreamThread.java all uncaughtException are captured and
> finally is called to shutdown
>
> I agree, that global exception handler is not available for a running
> stream.
>
> While thinking through found some options
>
> 1. Catching exceptions in each flow and handling them locally
> 2. catching exceptions by wrapping the methods with an aspect and
> handling them globally
>
> Regards
> Sriram
>
> On Thu, Aug 30, 2018 at 10:42 AM Sriram KS <
srira...@gmail.com
> <mailto:
srira...@gmail.com>> wrote:
>
> If your case is to continue processing and log your message to a
> separate topic i would advice to use
>
>
> default.deserialization.exception.handler
> <
https://kafka.apache.org/20/documentation/streams/developer-guide/config-streams#id7>
> /*_corrupt data, incorrect serialization logic, or unhandled record
> types_*/
> /*_
> _*/
> <mailto:
confluent-platf...@googlegroups.com>.
> <mailto:
confluent...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/confluent-platform/47cf40c7-7e2e-4a43-a21e-209fb88afc31%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <mailto:
confluent-platf...@googlegroups.com>.
> <mailto:
confluent...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/confluent-platform/CAGRGRQ4RfsUgD1Ti9X%3DeAJDLL-vx7rPDHhLhCWbk6-CTMTZDUw%40mail.gmail.com
> <
https://groups.google.com/d/msgid/confluent-platform/CAGRGRQ4RfsUgD1Ti9X%3DeAJDLL-vx7rPDHhLhCWbk6-CTMTZDUw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> <mailto:
confluent-platf...@googlegroups.com>.
> <mailto:
confluent...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/confluent-platform/CAOJy%2B2L1PHY5gutYo3WdvCGDGantqbTdqV2Ukxy71ha%2BCpDnig%40mail.gmail.com
> <
https://groups.google.com/d/msgid/confluent-platform/CAOJy%2B2L1PHY5gutYo3WdvCGDGantqbTdqV2Ukxy71ha%2BCpDnig%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> <mailto:
confluent-platf...@googlegroups.com>.
> <mailto:
confluent...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/confluent-platform/CAGRGRQ6cNw4VxqPU%3DeOdTKo7P7eLUEiLPKdXb8w-Vz3GLWeGmA%40mail.gmail.com
> <
https://groups.google.com/d/msgid/confluent-platform/CAGRGRQ6cNw4VxqPU%3DeOdTKo7P7eLUEiLPKdXb8w-Vz3GLWeGmA%40mail.gmail.com?utm_medium=email&utm_source=footer>.