kafka

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 12 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)) error

func NewProducer

func NewProducer(ctx context.Context, kafkaUrl string, topic string, debug bool) (interfaces.Producer, error)

Types

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