diff --git a/docs/config.md b/docs/config.md index 71ffa8c6..d3a6917c 100644 --- a/docs/config.md +++ b/docs/config.md @@ -80,17 +80,17 @@ The default configuration file is /etc/vflow/mq.conf, you can be able to change ## Configuration Keys The Kafka configuration contains the following key -|Key | Default | Environment variable | Description | -|---------------------| ------------|--------------------------|------------------------------------------------------------------------------------| -|brokers | - | VFLOW_KAFKA_BROKERS | kafka broker addresses | -|compression | none | VFLOW_KAFKA_COMPRESSION | compression codecs: gzip, snappy, lz4 | -|retry-max | 2 | VFLOW_KAFKA_RETRY_MAX | the total number of times to retry | -|request-size-max | 104857600 | NA | the maximum size (in bytes) of any request that will be attempted to send to Kafka | -|retry-backoff | 10 | VFLOW_KAFKA_RETRY_BACKOFF| wait for leader election to occur before retrying in milliseconds | -|tls-cert | none | VFLOW_KAFKA_TLS_CERT | certificate file for client authentication | -|tls-key | none | VFLOW_KAFKA_TLS_KEY | key file for client authentication | -|ca-file | none | VFLOW_KAFKA_CA_FILE | certificate authority file for TLS client authentication | -|verify-ssl | true | VFLOW_KAFKA_VERIFY_SSL | verify ssl certificates chain | +|Key | Default | Environment variable | Description | +|---------------------| ------------|------------------------------|------------------------------------------------------------------------------------| +|brokers | - | VFLOW_KAFKA_BROKERS | kafka broker addresses | +|compression | none | VFLOW_KAFKA_COMPRESSION | compression codecs: gzip, snappy, lz4 | +|retry-max | 2 | VFLOW_KAFKA_RETRY_MAX | the total number of times to retry | +|request-size-max | 104857600 | VFLOW_KAFKA_REQUEST_SIZE_MAX | the maximum size (in bytes) of any request that will be attempted to send to Kafka | +|retry-backoff | 10 | VFLOW_KAFKA_RETRY_BACKOFF | wait for leader election to occur before retrying in milliseconds | +|tls-cert | none | VFLOW_KAFKA_TLS_CERT | certificate file for client authentication | +|tls-key | none | VFLOW_KAFKA_TLS_KEY | key file for client authentication | +|ca-file | none | VFLOW_KAFKA_CA_FILE | certificate authority file for TLS client authentication | +|verify-ssl | true | VFLOW_KAFKA_VERIFY_SSL | verify ssl certificates chain | ## Example ``` diff --git a/producer/kafka.go b/producer/kafka.go index 68992038..ce0dc447 100644 --- a/producer/kafka.go +++ b/producer/kafka.go @@ -49,7 +49,7 @@ type KafkaConfig struct { Brokers []string `yaml:"brokers" env:"BROKERS"` Compression string `yaml:"compression" env:"COMPRESSION"` RetryMax int `yaml:"retry-max" env:"RETRY_MAX"` - RequestSizeMax int32 `yaml:"request-size-max" env:"NA"` + RequestSizeMax int32 `yaml:"request-size-max" env:"REQUEST_SIZE_MAX"` RetryBackoff int `yaml:"retry-backoff" env:"RETRY_BACKOFF"` TLSCertFile string `yaml:"tls-cert" env:"TLS_CERT"` TLSKeyFile string `yaml:"tls-key" env:"TLS_KEY"`