Kaffe.Config.Producer (Kaffe v1.28.0)
View SourceConfiguration for Kaffe producers.
:heroku_kafka_envEndpoints and SSL configuration will be pulled from ENV:endpointsThe endpoints to produce to. Supports either host-port tuples ([localhost: 9092], as an example), or urls.:topicsa list of Kafka topics to prep for producing:partition_strategyThe strategy to use when selecting the next partition. Defaults to:md5.:md5: provides even and deterministic distrbution of the messages over the available partitions based on an MD5 hash of the key:random- Select a random partition- function - Pass a function as an argument that accepts five arguments and returns the partition number
to use for the message
- The args are
topic, current_partition, partitions_count, key, value
- The args are
:auto_start_producersIf true,brodclient will spawn a producer automatically when user is trying to call produce but did not call brod:start_producer explicitly. Defaults to true. Seebroddocumentation for more details.:allow_topic_auto_creationBy default,brodrespects what is configured in the broker about topic auto-creation. i.e. whetherauto.create.topics.enableis set in the broker configuration. However ifallow_topic_auto_creationis set to false in client config, brod will avoid sending metadata requests that may cause an auto-creation of the topic regardless of what broker config is. Defaults to false. Seebrodfor more details.:required_acksHow many acknowledgements the kafka broker should receive from the clustered replicas before acking producer. Defaults to -1. See brod for more details.- 0: the broker will not send any response (this is the only case where the broker will not reply to a request)
- 1: The leader will wait the data is written to the local log before sending a response.
- -1: If it is -1 the broker will block until the message is committed by all in sync replicas before acking.
:ack_timeoutMaximum time in milliseconds the broker can await the receipt of the number of acknowledgements inrequired_acks. The timeout is not an exact limit on the request time. Defaults to 1000. Seebrodfor more details.:partition_buffer_limitHow many requests (per-partition) can be buffered without blocking the caller. Defaults to 512. Seebrodfor more details.:partition_onwire_limitHow many message sets (per-partition) can be sent to kafka broker asynchronously before receiving ACKs from broker. Setting a number greater than 1 may cause messages being persisted in an order different from the order they were produced. Defaults to 1. Seebrodfor more details.:max_batch_sizeThe number of bytes to batch produced messages to brokers in case callers are producing faster than brokers can handle. If compression is enabled, care should be taken when picking the max batch size, because a compressed batch will be produced as one message and this message might be larger than 'max.message.bytes' in kafka config (or topic config). Seebrodfor more details.:max_retriesThe number of times to retry message production. Defaults to 3. Seebrodfor more details.:retry_backoff_msThe number of ms to wait between retries. Defaults to 500. Seebrodfor more details.:compressionThe compression algorithm to use. Possible values are:gzip,:no_compression, or:snappy. Defaults to:no_compression.