Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface {
NewProducer(logger *zap.Logger) (sarama.AsyncProducer, error)
}
Builder builds a new kafka producer
type Configuration ¶
type Configuration struct { Brokers []string `mapstructure:"brokers"` RequiredAcks sarama.RequiredAcks `mapstructure:"required_acks"` Compression sarama.CompressionCodec `mapstructure:"compression"` CompressionLevel int `mapstructure:"compression_level"` ProtocolVersion string `mapstructure:"protocol_version"` BatchLinger time.Duration `mapstructure:"batch_linger"` BatchSize int `mapstructure:"batch_size"` BatchMinMessages int `mapstructure:"batch_min_messages"` BatchMaxMessages int `mapstructure:"batch_max_messages"` MaxMessageBytes int `mapstructure:"max_message_bytes"` auth.AuthenticationConfig `mapstructure:"authentication"` }
Configuration describes the configuration properties needed to create a Kafka producer
func (*Configuration) NewProducer ¶
func (c *Configuration) NewProducer(logger *zap.Logger) (sarama.AsyncProducer, error)
NewProducer creates a new asynchronous kafka producer
Click to show internal directories.
Click to hide internal directories.