kafka

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddService

func AddService(config service.Config)

func BatchMessages added in v0.3.5

func BatchMessages(ctx context.Context, values <-chan kafka.Message, maxItems int, maxTimeout time.Duration) chan []kafka.Message

func GetWriterTopic added in v0.3.12

func GetWriterTopic() string

func Handle

func Handle(done, sendCtx context.Context, cancelSend context.CancelFunc, messages <-chan kafka.Message, wg *sync.WaitGroup) <-chan kafka.Message

func MessageAsString added in v0.3.9

func MessageAsString(message kafka.Message) string

func MustProduce added in v0.3.12

func MustProduce() bool

func NewConsumer

func NewConsumer(done, sendCtx context.Context, kafkaURL string, wg *sync.WaitGroup) <-chan kafka.Message

func NewProducer

func NewProducer(done context.Context, cancelSend context.CancelFunc, kafkaURL string, in <-chan kafka.Message, wg *sync.WaitGroup)

func Start

func Start(done context.Context)

Types

type SimpleMessage added in v0.3.9

type SimpleMessage struct {
	Topic         string
	Partition     int
	Offset        int64
	HighWaterMark int64
	Headers       []kafka.Header
	Time          time.Time
	Key           string
	Value         string
}

func MessageSimplified added in v0.3.9

func MessageSimplified(message kafka.Message) SimpleMessage

func MessagesSimplified added in v0.3.9

func MessagesSimplified(messages []kafka.Message) []SimpleMessage

Jump to

Keyboard shortcuts

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