kafkaflow icon indicating copy to clipboard operation
kafkaflow copied to clipboard

WhenNoHandlerFound isn't triggered in all cases

Open AlexeyRaga opened this issue 2 years ago • 4 comments

I am using KafkaFlow with SchemaRegistryAvroSerialiser. I configure no handlers, and only WhenNoHandlerFound for the sake of an example.

When consumer gets the message and reads its schema from Schema Registry, tries to scan all the assemblies in the AppDomain to find a corresponding .NET type.

Then it has two choices:

  1. The type is found. In this case "no handler" action is fired correctly.
  2. Type is not found. This may happen when the consumer isn't aware of the message of a given schema and doesn't have a type for it, or if an assembly that contains this type isn't yet loaded into AppDomain. In this case the message seems to be just ignored and the "no handler" action is not triggered.

Expected behaviour: "No handler" action is triggered for any message that doesn't have a handler registered for it, regardless if the corresponding .NET type exists or not in the consumer's AppDomain.

AlexeyRaga avatar Jul 01 '22 15:07 AlexeyRaga

I can confirm this. Just spent a day debugging the custom type resolvers and handlers not getting called due to this issue and and due to the changes made in #342. The changes are being introduced into master too lightly.

mhkolk avatar Apr 08 '23 07:04 mhkolk

Hi @AlexeyRaga,

Thank you for your contribution.

We are sorry to provide feedback just now.

Can you please consider update to the latest KafkaFlow version and check if the issue still persist?

We see this action valuable to pursue this topic in the near future.

JoaoRodriguesGithub avatar Mar 12 '24 15:03 JoaoRodriguesGithub

I just tested it with 3.0.4. It's still not triggering by type missmatch.

fuzolan avatar Mar 13 '24 23:03 fuzolan

Hi @fuzolan,

Thank you for checking.

We are planning on addressing this ASAP.

JoaoRodriguesGithub avatar Mar 15 '24 15:03 JoaoRodriguesGithub