consume_callback_callback

@brief Consumes messages from topic \p rkt and \p partition, calling the provided callback for each consumed messsage.

rd_kafka_consume_callback() provides higher throughput performance than both rd_kafka_consume() and rd_kafka_consume_batch().

\p timeout_ms is the maximum amount of time to wait for one or more messages to arrive.

The provided \p consume_cb function is called for each message, the application \b MUST \b NOT call rd_kafka_message_destroy() on the provided \p rkmessage.

The \p opaque argument is passed to the 'consume_cb' as \p opaque.

@returns the number of messages processed or -1 on error.

@sa rd_kafka_consume()

  1. alias consume_callback_callback = void function(rd_kafka_message_t* rkmessage, void* opaque) nothrow @(nogc)
    extern (C) nothrow @nogc
    alias consume_callback_callback = void function nothrow @nogc
  2. int rd_kafka_consume_callback(rd_kafka_topic_t* rkt, int32_t partition, int timeout_ms, consume_callback_callback consume_cb, void* opaque)

Meta