You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by TANISHQ BATRA <ta...@gmail.com> on 2019/12/17 18:29:02 UTC

Kafka Stream 2.3 DeserializationExceptionHandler issue !

Hi Team,

Could you please help us out in 1 issue related to Kafka stream.

   - Os: Windows 10
   - Kafka on windows 10


I am trying to utilize custom *DeserializationExceptionHandler  *in Kafka
Stream DSL 2.3, using 5 partition to test.

   - Scenario 1: Using Custom Serde(Processing guarantee: *exactly_once*)

While giving a *Poison pill,it* leads to Exception in custom Serde which
reaches Custom DeserializationExceptionHandler  .
Here the Processor context provided by the overridden (Interface
DeserializationExceptionHandler  ) "handle" method. Sometimes behaves
normally but sometime  provides with different information like headers of
different request as if the ProcessorContext object is not thread safe. (Is
it Thread safe?) and sometimes the below *error*:
java.lang.*IllegalStateException*: This should not happen as
context.partition() should only be called while a record is processed.


   - Scenario 2:

When we restart the stream,some of these poison pill are consumed again .
As if they where not committed on the first step.

Note : I am always returning
DeserializationExceptionHandler.DeserializationHandlerResponse.CONTINUE in
handler, Is it a bug in 2.3?

Any Suggestions would be of great help.
Please let me know if any more information is needed from my end.

Thanks and Regards,
Tanishq Batra
Ph- +91-9407244600

Re: Kafka Stream 2.3 DeserializationExceptionHandler issue !

Posted by "Matthias J. Sax" <ma...@confluent.io>.
Not sure about the first issue you report, however, in general this may
indicate a user error (but I am not 100% sure; might also be a bug):
https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-WhydoIgetanIllegalStateExceptionwhenaccessingrecordmetadata?


For the second issue, it might be a know problem:
https://issues.apache.org/jira/browse/KAFKA-6502


-Matthias

On 12/17/19 10:29 AM, TANISHQ BATRA wrote:
> Hi Team,
> 
> Could you please help us out in 1 issue related to Kafka stream.
> 
>    - Os: Windows 10
>    - Kafka on windows 10
> 
> 
> I am trying to utilize custom *DeserializationExceptionHandler  *in Kafka
> Stream DSL 2.3, using 5 partition to test.
> 
>    - Scenario 1: Using Custom Serde(Processing guarantee: *exactly_once*)
> 
> While giving a *Poison pill,it* leads to Exception in custom Serde which
> reaches Custom DeserializationExceptionHandler  .
> Here the Processor context provided by the overridden (Interface
> DeserializationExceptionHandler  ) "handle" method. Sometimes behaves
> normally but sometime  provides with different information like headers of
> different request as if the ProcessorContext object is not thread safe. (Is
> it Thread safe?) and sometimes the below *error*:
> java.lang.*IllegalStateException*: This should not happen as
> context.partition() should only be called while a record is processed.
> 
> 
>    - Scenario 2:
> 
> When we restart the stream,some of these poison pill are consumed again .
> As if they where not committed on the first step.
> 
> Note : I am always returning
> DeserializationExceptionHandler.DeserializationHandlerResponse.CONTINUE in
> handler, Is it a bug in 2.3?
> 
> Any Suggestions would be of great help.
> Please let me know if any more information is needed from my end.
> 
> Thanks and Regards,
> Tanishq Batra
> Ph- +91-9407244600
>