class MessageAndOffset

Header File: <libkafka_asio/message.h>

Namespace: libkafka_asio

Adds offset information to the Message class. Used for message consumption from Kafka.


MessageAndOffset (overload 1 of 2)


Creates an empty MessageAndOffset object. The offset information defaults to zero.

MessageAndOffset (overload 2 of 2)

MessageAndOffset(const Message& message, Int64 offset)

Creates a MessageAndOffset object by copying the given Message object (flat copy) and using the given offset information.

Member Functions


Int64 offset() const

Returns the offset information.


void set_offset(Int64 offset)

Sets the offset information.