consumer

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 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"`
	InitialOffset        int64
	GroupID              string `mapstructure:"group_id"`
	ClientID             string `mapstructure:"client_id"`
	ProtocolVersion      string `mapstructure:"protocol_version"`
	RackID               string `mapstructure:"rack_id"`
	FetchMaxMessageBytes int32  `mapstructure:"fetch_max_message_bytes"`
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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