consumer

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BATCH_MAX_BYTES = 10e6 // 10MB
View Source
const BATCH_MIN_BYTES = 10e3 // 10kB

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	KafkaAddr string
	Topic     string
	Partition int
	Group     string
	// contains filtered or unexported fields
}

func InitConsumer

func InitConsumer(addr, topic, group string, partition int) *Consumer

If group is setted, partition will be ignored

func (*Consumer) ConsumeEvent

func (c *Consumer) ConsumeEvent(messageChan chan kafka.Message)

func (*Consumer) Stop

func (c *Consumer) Stop()

Jump to

Keyboard shortcuts

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