Struct rdkafka::consumer::stream_consumer::StreamConsumer [] [src]

#[must_use = "Consumer polling thread will stop immediately if unused"]
pub struct StreamConsumer<C: ConsumerContext + 'static> { /* fields omitted */ }

A Consumer with an associated polling thread. This consumer doesn't need to be polled and it will return all consumed messages as a Stream. Due to the asynchronous nature of the stream, some messages might be consumed by the consumer without being processed on the other end of the stream. If auto commit is used, it might cause message loss after consumer restart. Manual offset commit should be used instead.

Methods

impl<C: ConsumerContext> StreamConsumer<C>
[src]

Starts the StreamConsumer, returning a MessageStream.

Stops the StreamConsumer, blocking the caller until the internal consumer has been stopped.

Trait Implementations

impl<C: ConsumerContext> Consumer<C> for StreamConsumer<C>
[src]

Returns a reference to the BaseConsumer.

Subscribe the consumer to a list of topics.

Manually assign topics and partitions to the consumer.

Commit offsets on broker for the provided list of partitions. If mode is set to CommitMode::Sync, the call will block until the message has been successfully committed. Read more

Commit a specific message. If mode is set to CommitMode::Sync, the call will block until the message has been successfully committed. Read more

Returns the current topic subscription.

Returns the current partition assignment.

Retrieve committed offsets for topics and partitions.

Retrieve current positions (offsets) for topics and partitions.

Returns the metadata information for all the topics in the cluster.

Returns the metadata information for all the topics in the cluster.

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

impl FromClientConfig for StreamConsumer<EmptyConsumerContext>
[src]

impl<C: ConsumerContext> FromClientConfigAndContext<C> for StreamConsumer<C>
[src]

Creates a new Consumer starting from a ClientConfig.

impl<C: ConsumerContext> Drop for StreamConsumer<C>
[src]

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