consumer

package
v1.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 6 Imported by: 50

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	NewConsumer() (Consumer, error)
}

Builder builds a new kafka consumer

type Configuration

type Configuration struct {
	auth.AuthenticationConfig `mapstructure:"authentication"`
	Consumer

	Brokers         []string `mapstructure:"brokers"`
	Topic           string   `mapstructure:"topic"`
	GroupID         string   `mapstructure:"group_id"`
	ClientID        string   `mapstructure:"client_id"`
	ProtocolVersion string   `mapstructure:"protocol_version"`
	RackID          string   `mapstructure:"rack_id"`
}

Configuration describes the configuration properties needed to create a Kafka consumer

func (*Configuration) NewConsumer

func (c *Configuration) NewConsumer(logger *zap.Logger) (Consumer, error)

NewConsumer creates a new kafka consumer

type Consumer

type Consumer interface {
	Partitions() <-chan cluster.PartitionConsumer
	MarkPartitionOffset(topic string, partition int32, offset int64, metadata string)
	io.Closer
}

Consumer is an interface to features of Sarama that are necessary for the consumer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL