Configuration Options
KP can be configured using a config.KPConfig
object.
Here's the structure of KPConfig struct
package config
type KPConfig struct {
KafkaConfig Kafka
SchemaRegistryConfig SchemaRegistry
}
type Kafka struct {
ConsumerGroupName string
BootstrapServers string
SaslMechanism *string
SecurityProtocol *string
Username *string
Password *string
ConsumerSessionTimeoutMs *int
ConsumerAutoOffsetReset *string
}
type SchemaRegistry struct {
Endpoint string
Username string
Password string
}
Kafka Configuration
The following fields are used to configure KP
BootstrapServers
(required): URL to bootstrap servers eg: "localhost"SaslMechanism
(optional): Learn about SASL authentication here (default:""
)SecurityProtocol
(optional): Learn more about auth here (default:""
)Username
(optional): Value used forsasl.username
(default:""
).Password
(optional): Value used forsasl.password
(default:""
).ConsumerGroupName
(required, consumer only): To configure consumer group idConsumerSessionTimeoutMs
(optional, consumer only): Value used forsession.timeout.ms
(default:6000
).ConsumerAutoOffsetReset
(optional, consumer only): Value used forauto.offset.reset
(default:"earliest"
).
Schema Registry Configuration
The following fields are used for schema registry. As of now KP doesn't support running without a schema registry and there are no immediate active plans to change that.
Endpoint
(required): URL to schema registry, eg: "http://localhost:8081"Username
(optional): Username for basic authentication with schema registry (default:""
)Password
(optional): Password for basic authentication with schema registry (default:""
)