# WaterDrop Configuration WaterDrop is a complex tool that contains multiple configuration options. To keep everything organized, all the configuration options were divided into two groups: - WaterDrop options - options directly related to WaterDrop and its components - Kafka driver options - options related to `librdkafka` To apply all those configuration options, you need to create a producer instance and use the ```#setup``` method: ```ruby producer = WaterDrop::Producer.new producer.setup do |config| config.deliver = true config.kafka = { 'bootstrap.servers': 'localhost:9092', 'request.required.acks': 1 } end ``` or you can do the same while initializing the producer: ```ruby producer = WaterDrop::Producer.new do |config| config.deliver = true config.kafka = { 'bootstrap.servers': 'localhost:9092', 'request.required.acks': 1 } end ``` ## WaterDrop Configuration / WaterDrop configuration options Some of the options are:
| Option | Description |
|---|---|
id |
ID of the producer for instrumentation and logging |
logger |
Logger to use |
client_class |
Client class for creating the underlying client used to produce messages |
deliver |
Whether to send messages to Kafka or only fake the delivery |
max_wait_timeout |
Waits that long for the delivery report or raises an error |
wait_on_queue_full |
Whether to wait on a full queue or raise an error |
wait_backoff_on_queue_full |
Waits that long before a retry when the queue is full |
wait_timeout_on_queue_full |
Total wait time on a full queue before the error is raised |
wait_backoff_on_transaction_command |
How long to wait before retrying a retryable transaction related error |
max_attempts_on_transaction_command |
How many times to retry a retryable transaction related error before giving up |
reload_on_idempotent_fatal_error |
Automatically reload producer after fatal errors on idempotent producers |
wait_backoff_on_idempotent_fatal_error |
Time to wait (ms) before retrying after an idempotent fatal error reload |
max_attempts_on_idempotent_fatal_error |
Maximum number of reload attempts for idempotent fatal errors |
reload_on_transaction_fatal_error |
Automatically reload producer after fatal errors in transactions |
wait_backoff_on_transaction_fatal_error |
Time to wait (ms) before continuing after a transactional fatal error reload |
max_attempts_on_transaction_fatal_error |
Maximum number of reload attempts for transactional fatal errors |
non_reloadable_errors |
Fatal error codes that do not start a reload (idempotent and transactional) |
wait_timeout_on_transaction_abort |
Max time to wait (ms) for the first delivery before aborting a transaction |
instrument_on_wait_queue_full |
Whether to instrument when queue_full occurs |
partition_count_cache_ttl_ms |
Process-wide partition count cache TTL (ms); nil (default) keeps the karafka-rdkafka value |
statistics_decorator |
Custom decorator for controlling which statistics keys get _d/_fd deltas |