@brief Creates a new Kafka handle and starts its operation according to the
specified \p type (\p RD_KAFKA_CONSUMER or \p RD_KAFKA_PRODUCER).
\p conf is an optional struct created with rd_kafka_conf_new() that will
be used instead of the default configuration.
The \p conf object is freed by this function on success and must not be used
or destroyed by the application sub-sequently.
See rd_kafka_conf_set() et.al for more information.
\p errstr must be a pointer to memory of at least size \p errstr_size where
rd_kafka_new() may write a human readable error message in case the
creation of a new handle fails. In which case the function returns NULL.
@remark \b RD_KAFKA_CONSUMER: When a new \p RD_KAFKA_CONSUMER
rd_kafka_t handle is created it may either operate in the
legacy simple consumer mode using the rd_kafka_consume_start()
interface, or the High-level KafkaConsumer API.
@remark An application must only use one of these groups of APIs on a given
rd_kafka_t RD_KAFKA_CONSUMER handle.
@brief Creates a new Kafka handle and starts its operation according to the specified \p type (\p RD_KAFKA_CONSUMER or \p RD_KAFKA_PRODUCER).
\p conf is an optional struct created with rd_kafka_conf_new() that will be used instead of the default configuration. The \p conf object is freed by this function on success and must not be used or destroyed by the application sub-sequently. See rd_kafka_conf_set() et.al for more information.
\p errstr must be a pointer to memory of at least size \p errstr_size where rd_kafka_new() may write a human readable error message in case the creation of a new handle fails. In which case the function returns NULL.
@remark \b RD_KAFKA_CONSUMER: When a new \p RD_KAFKA_CONSUMER rd_kafka_t handle is created it may either operate in the legacy simple consumer mode using the rd_kafka_consume_start() interface, or the High-level KafkaConsumer API. @remark An application must only use one of these groups of APIs on a given rd_kafka_t RD_KAFKA_CONSUMER handle.