Consume a single message from \p topic and \p partition.
\p timeout_ms is maximum amount of time to wait for a message to be
received.
Consumer must have been previously started with \p ...start().
a Message object, the application needs to check if message
is an error or a proper message Message::err() and checking for
\p ErrorCode.no_error.
The message object must be destroyed when the application is done with it.
Errors (in Message::err()):
- timed_out - \p timeout_ms was reached with no new messages fetched.
- PARTITION_EOF - End of partition reached, not an error.
voidconsume(Topic topic, int partition, int timeout_ms, Message msg)
Consume a single message from \p topic and \p partition.
\p timeout_ms is maximum amount of time to wait for a message to be received. Consumer must have been previously started with \p ...start().
a Message object, the application needs to check if message is an error or a proper message Message::err() and checking for \p ErrorCode.no_error.
The message object must be destroyed when the application is done with it.
Errors (in Message::err()): - timed_out - \p timeout_ms was reached with no new messages fetched. - PARTITION_EOF - End of partition reached, not an error.