rd_kafka_consume_start

@brief Start consuming messages for topic \p rkt and \p partition at offset \p offset which may either be an absolute \c (0..N) or one of the logical offsets: - RD_KAFKA_OFFSET_BEGINNING - RD_KAFKA_OFFSET_END - RD_KAFKA_OFFSET_STORED - RD_KAFKA_OFFSET_TAIL

rdkafka will attempt to keep \c queued.min.messages (config property) messages in the local queue by repeatedly fetching batches of messages from the broker until the threshold is reached.

The application shall use one of the rd_kafka_consume*() functions to consume messages from the local queue, each kafka message being represented as a rd_kafka_message_t * object.

rd_kafka_consume_start() must not be called multiple times for the same topic and partition without stopping consumption first with rd_kafka_consume_stop().

@returns 0 on success or -1 on error in which case errno is set accordingly: - EBUSY - Conflicts with an existing or previous subscription (RD_KAFKA_RESP_ERR__CONFLICT) - EINVAL - Invalid offset, or incomplete configuration (lacking group.id) (RD_KAFKA_RESP_ERR__INVALID_ARG) - ESRCH - requested \p partition is invalid. (RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION) - ENOENT - topic is unknown in the Kafka cluster. (RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC)

Use rd_kafka_errno2err() to convert sytem \c errno to rd_kafka_resp_err_t

extern (C) nothrow @nogc
int
rd_kafka_consume_start

Meta