#include <userver/kafka/message.hpp>
Wrapper for polled message data access.
Definition at line 23 of file message.hpp.
Public Member Functions | |
Message (Message &&) noexcept | |
Message & | operator= (Message &&) noexcept=delete |
Message (const Message &)=delete | |
Message & | operator= (const Message &)=delete |
const std::string & | GetTopic () const |
std::string_view | GetKey () const |
std::string_view | GetPayload () const |
std::optional< std::chrono::milliseconds > | GetTimestamp () const |
int | GetPartition () const |
std::int64_t | GetOffset () const |
HeadersReader | GetHeaders () const & |
HeadersReader | GetHeaders () &&=delete |
std::optional< std::string_view > | GetHeader (utils::NullTerminatedView name) const |
Returns last header with given name. | |
std::optional< std::string_view > kafka::Message::GetHeader | ( | utils::NullTerminatedView | name | ) | const |
Returns last header with given name.
HeadersReader kafka::Message::GetHeaders | ( | ) | const & |
If name name
passed, only headers with such name returns
Usage example: