rd_kafka_consume_batch

@brief Consume up to \p rkmessages_size from topic \p rkt and \p partition putting a pointer to each message in the application provided array \p rkmessages (of size \p rkmessages_size entries).

rd_kafka_consume_batch() provides higher throughput performance than rd_kafka_consume().

\p timeout_ms is the maximum amount of time to wait for all of \p rkmessages_size messages to be put into \p rkmessages. If no messages were available within the timeout period this function returns 0 and \p rkmessages remains untouched. This differs somewhat from rd_kafka_consume().

The message objects must be destroyed with rd_kafka_message_destroy() when the application is done with it.

@returns the number of rkmessages added in \p rkmessages, or -1 on error (same error codes as for rd_kafka_consume().

@sa rd_kafka_consume()

extern (C) nothrow @nogc
rd_kafka_consume_batch

Meta