Struct rdkafka::message::Message [] [src]

pub struct Message { /* fields omitted */ }

A native librdkafka message.

Methods

impl<'a> Message
[src]

Creates a new Message that wraps the native Kafka message pointer.

Returns a pointer to the RDKafkaMessage.

Returns the length of the key field of the message.

Returns the length of the payload field of the message.

Returns the key of the message, or None if there is no key.

Returns the payload of the message, or None if there is no payload.

Converts the raw bytes of the payload to a reference of type &P, pointing to the same data inside the message. The returned reference cannot outlive the message.

Converts the raw bytes of the key to a reference of type &K, pointing to the same data inside the message. The returned reference cannot outlive the message.

Returns the partition number where the message is stored.

Returns the offset of the message.

Returns the message timestamp for a consumed message if available.

Trait Implementations

impl Debug for Message
[src]

Formats the value using the given formatter.

impl Send for Message
[src]

impl Drop for Message
[src]

A method called when the value goes out of scope. Read more