confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
2.78k stars 847 forks source link

Allow multiple calls to SetStatisticsHandler / SetLogHandler / SetErrorHandler #2154

Open g7ed6e opened 6 months ago

g7ed6e commented 6 months ago

The LogHandler and the StatisticsHandler are protected internal non virtual multicast delegates. This visibility and the fact that current implementation throw when a SetXXXHandler is called multiple times defeats the purpose of multicast delegates and make implementation of a 3rd party package using these delegates fragile. I’m thinking there to the implementation of an instrumentation packages for example.