consumer

package
v0.0.0-...-c2c101f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KAFKA_CONSUMER_EVENT_UNINITIALIZED      = 0x00
	KAFKA_CONSUMER_EVENT_ASSIGNEDPARTITIONS = 0x10
	KAFKA_CONSUMER_EVENT_REVOKEDPARTITIONS  = 0x11
	KAFKA_CONSUMER_EVENT_MESSAGE            = 0x12
	KAFKA_CONSUMER_EVENT_PARTITIONEOF       = 0x13
	KAFKA_CONSUMER_EVENT_ERROR              = 0x14
	KAFKA_CONSUMER_EVENT_CLOSE              = 0x20
	KAFKA_CONSUMER_EVENT_INITIALIZATION     = 0x21
	KAFKA_CONSUMER_SESSION_TIMEOUT_MS       = 6000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaConsumer

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

func NewKafkaConsumer

func NewKafkaConsumer(req *types.NewKafkaConsumerReq, dealMessageFunc func(ctx context.Context, req *types.KafkaReq) (err error), broker string) *KafkaConsumer

func (*KafkaConsumer) Close

func (kc *KafkaConsumer) Close()

func (*KafkaConsumer) Start

func (kc *KafkaConsumer) Start(ctx context.Context) (err error)

func (*KafkaConsumer) Stop

func (kc *KafkaConsumer) Stop()

func (*KafkaConsumer) UpdateStatus

func (kc *KafkaConsumer) UpdateStatus(partition *kafka.TopicPartition)

type TopicPartMeta

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

Jump to

Keyboard shortcuts

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