-
I'm looking to log the producer config after we create one. I grab the conf from the producer using rd_kafka_conf, which is specified as const. However, rd_kafka_conf_dump does not specify the const qualifier, causing me to duplicate the conf before dumping. Looking at the code, there is no reason why the const qualifier is not in the dump API. Is this a bug, or is there a reason to not allow dumping a config from an instantiated producer? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
That's a mistake for the dump() function signature, it should be const and it is treated as const internally. So you can safely cast your retrieved config to be un-const when calling this function. Also have a look at |
Beta Was this translation helpful? Give feedback.
That's a mistake for the dump() function signature, it should be const and it is treated as const internally. So you can safely cast your retrieved config to be un-const when calling this function.
Also have a look at
debug=conf
which prints the config on client initialization.