While creating a kafka producer object, it expects the Kafka Serializer passed to have this constructor. I think it is more for getting a reference of the config passed, in order take actions in the serializer accordingly.