[WIP] [Host.Kafka] Add configurable client builder factories with logging support#467
[WIP] [Host.Kafka] Add configurable client builder factories with logging support#467saneks222 wants to merge 1 commit into
Conversation
|
|
@saneks222 you’re definitely on the right track here. Also, to get the DCO gate passing, please follow the sign-off requirement. I was wondering whether we should go beyond just
That said, this might not be worth it if it adds too much complexity. What do you think? |
I like the idea of passing Regarding Regarding the sign-off requirement - the first time I really did commit without a signature, but later I fixed it according to the instructions. The signature is now visible in the commit description. I don't quite understand why the CI/CD is still not happy with this. Maybe I missed something? |



Summary
Enhances the Kafka transport provider by adding a KafkaClientConfig wrapper to the producer and consumer builder factories. This allows custom factories to access both the Confluent client configuration and an ILogger instance, enabling more flexible client.
What's included
New KafkaClientConfig class — wraps ConfluentConfig (of type T : ClientConfig) and an ILogger to provide full context for builder factories
Updated factory — ProducerBuilderFactory and ConsumerBuilderFactory now accept KafkaClientConfig and KafkaClientConfig respectively, instead of raw ProducerConfig/ConsumerConfig
Logger propagation — passes the SMB logger through to custom factories so consumers/producers can be instrumented consistently
Backward compatibility preserved — default factories continue to work using the ConfluentConfig property internally
Refactored internal creation — CreateConsumer() and CreateProducerInternal() now construct KafkaClientConfig with the appropriate config and logger