userver: kafka::ProducerExecutionParams Struct Reference
Loading...
Searching...
No Matches
kafka::ProducerExecutionParams Struct Referencefinal

#include <userver/kafka/producer.hpp>

Detailed Description

Parameters Producer uses in runtime. The struct is used only for documentation purposes, Producer can be created through ProducerComponent.

Definition at line 28 of file producer.hpp.

Public Attributes

std::chrono::milliseconds poll_timeout {10}
 Time producer waits for new delivery events.
 
std::size_t send_retries {5}
 How many times Produce::Send* retries when delivery failures. Retries take place only when errors are transient.
 

Member Data Documentation

◆ poll_timeout

std::chrono::milliseconds kafka::ProducerExecutionParams::poll_timeout {10}

Time producer waits for new delivery events.

Definition at line 30 of file producer.hpp.

◆ send_retries

std::size_t kafka::ProducerExecutionParams::send_retries {5}

How many times Produce::Send* retries when delivery failures. Retries take place only when errors are transient.

Remarks
librdkafka already has a retry mechanism. Moreover, user-retried requests may lead to messages reordering or duplication. Nevertheless, the library retries a small list of delivery errors (such as message guaranteed timeouts), including errors those are not retried by librdkafka and errors that may occur when the Kafka cluster or topic have just been created (for instance, in tests)
See also
impl/producer_impl.cpp for the list of errors retryable by library

Definition at line 42 of file producer.hpp.


The documentation for this struct was generated from the following file: