Struct rdkafka::client::Client

source ·
pub struct Client<C: ClientContext = DefaultClientContext> { /* private fields */ }
Expand description

A low-level rdkafka client.

This type is the basis of the consumers and producers in the consumer and producer modules, respectively.

Typically you do not want to construct a Client directly, but instead construct a consumer or producer. A Client can be used, however, when only access to cluster metadata and watermarks is required.

Implementations§

Creates a new Client given a configuration, a client type and a context.

Returns a reference to the native rdkafka-sys client.

Returns a pointer to the native rdkafka-sys client.

Returns a reference to the context.

Returns the metadata information for the specified topic, or for all topics in the cluster if no topic is specified.

Returns high and low watermark for the specified topic and partition.

Returns the cluster identifier option or None if the cluster identifier is null

Returns the group membership information for the given group. If no group is specified, all groups will be returned.

Returns the first fatal error set on this client instance, or None if no fatal error has occurred.

This function is intended to be used with idempotent producers, where some errors must logically be considered fatal to retain consistency.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.