Struct rdkafka::producer::FutureProducer [] [src]

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

A producer with an internal running thread. This producer doesn't neeed to be polled. The internal thread can be terminated with the stop method or moving the ProducerPollingThread out of scope.

Methods

impl<C: ProducerContext> FutureProducer<C>
[src]

Starts the internal polling thread.

Stops the internal polling thread. The thread can also be stopped by moving the ProducerPollingThread out of scope.

Returns a topic associated to the current producer.

Sends a copy of the payload and key provided to the specified topic. When no partition is specified the underlying Kafka library picks a partition based on the key. Returns a DeliveryFuture or an error.

Trait Implementations

impl FromClientConfig for FutureProducer<EmptyProducerContext>
[src]

impl<C: ProducerContext> FromClientConfigAndContext<C> for FutureProducer<C>
[src]

impl<C: ProducerContext> Drop for FutureProducer<C>
[src]

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