Kafka/Wolverine.Kafka/Internals/KafkaTransport.cs:387-391: Wolverine installs consumerBuilder.SetErrorHandler(...) to feed its connection-state tracker. If the user already registered an error handler through ConfigureConsumers(...), Confluent's builder throws InvalidOperationException (a handler may be set once), Wolverine catches it and sets tracker.ErrorHandlerSuppressed = true — silently. From then on the transport's connection state never leaves Unknown: health checks, wolverine-diagnostics, and CritterWatch cannot tell a healthy Kafka consumer from one that has been disconnected for an hour.
Ask
- Log at Warning when the handler is suppressed, naming the consequence: "A consumer error handler was already registered through ConfigureConsumers(), so Wolverine cannot observe Kafka connection errors for {Uri}. Connection state will report Unknown. Chain Wolverine's handler from yours, or drop the custom handler."
- Better: expose a hook so a user handler can be composed rather than replace Wolverine's (wrap the user's delegate and call both).
- Related silences worth a warning-level line each, since they are the answers to "why are messages being redelivered": offset-commit failures are logged at Warning and swallowed (
Internals/KafkaOffsetCommitter.cs:307), and UseKafka sets EnableAutomaticFailureAcks = false with no log at all.
Kafka/Wolverine.Kafka/Internals/KafkaTransport.cs:387-391: Wolverine installsconsumerBuilder.SetErrorHandler(...)to feed its connection-state tracker. If the user already registered an error handler throughConfigureConsumers(...), Confluent's builder throwsInvalidOperationException(a handler may be set once), Wolverine catches it and setstracker.ErrorHandlerSuppressed = true— silently. From then on the transport's connection state never leaves Unknown: health checks,wolverine-diagnostics, and CritterWatch cannot tell a healthy Kafka consumer from one that has been disconnected for an hour.Ask
Internals/KafkaOffsetCommitter.cs:307), andUseKafkasetsEnableAutomaticFailureAcks = falsewith no log at all.