kafka

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommitError = errors.New("unable to commit to kafka")
View Source
var FetchError = errors.New("unable to fetch from kafka")
View Source
var HandlerError = errors.New("unable to handle kafka message")

Functions

func GetBroker

func GetBroker(bootstrapUrl string) (brokers []string, err error)

func InitTopic

func InitTopic(bootstrapUrl string, topics ...string) (err error)

func NewConsumer

func NewConsumer(ctx context.Context, config configuration.Config, topic string, listener func(delivery []byte) error, errorhandler func(err error) (fatal bool)) (err error)

func NewProducer

func NewProducer(ctx context.Context, kafkaUrl string, topic string, logger *slog.Logger, topicInit bool) (interfaces.Producer, error)

Types

type DebugLogPrinter added in v0.0.25

type DebugLogPrinter struct {
	// contains filtered or unexported fields
}

func (*DebugLogPrinter) Printf added in v0.0.25

func (this *DebugLogPrinter) Printf(s string, i ...interface{})

type Producer

type Producer struct {
	// contains filtered or unexported fields
}

func (*Producer) Produce

func (this *Producer) Produce(key string, message []byte) error

Jump to

Keyboard shortcuts

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