Does batch processing respect IgnoreUnhandledMessages? #213
Replies: 3 comments 5 replies
-
It should respect it, yes. |
Beta Was this translation helpful? Give feedback.
-
Hello @BEagle1984 I was debugging your code a little and can confirm that it throws UnhandledErrorException for batch consumer even if IgnoreUnhandledMessages used. For simple (not batch) consumer it's not reproducible. In the code i'm using Avro messages. To reproduce this i'm sending to a topic message with a type which can't be recognized by any consumer. For example consumer expects to see Car object but i send to topic Bicycle object. My code setup:
GenericRecord i used in the serializer to be sure all events will be unhandled Consumer:
My silverback registration:
To publish messages to the topic i'm using kafka-avro-console-producer tool. What i have noticed in your code I'm triggering this breakpoint several times per one message. It says handled true, but throwIfUnhandled false as expected. Then after this method execution my breakpoint being triggered in MessageStreamProvider.cs And in this method throwIfUnhandled is set to true and it throws an UnhandledMessageException not counting that we have enabled "IgnoreUnhandledMessages". I assume that it should be false to work as expected |
Beta Was this translation helpful? Give feedback.
-
@BEagle1984 This is my testing proj As an entry point i'm using docker project inside of the solution. To publish kafka event i'm using avro console tool inside schema-registry container (attaching shell to container) This is an example of the command for avro console tool
Currently in endpoint configurator i'm using GenericRecord type for deserializer. It will produce UnhandledMessageException with any avro event |
Beta Was this translation helpful? Give feedback.
-
Hi,
Is batch processing designed to adhere to the IgnoreUnhandledMessages setting? We seem to be encountering an “UnhandledMessageException”, despite our batch consumer being configured to ignore such messages.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions