kafka_consumer

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaConsumer

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

func New

func New(addressList string, group string, topicList []string) *KafkaConsumer

New 创建kafka消息者

func (*KafkaConsumer) Close

func (kc *KafkaConsumer) Close() error

func (*KafkaConsumer) SetErrorHandler

func (kc *KafkaConsumer) SetErrorHandler(handler KafkaConsumerErrorHandler)

func (*KafkaConsumer) SetMsgHandler

func (kc *KafkaConsumer) SetMsgHandler(handler KafkaConsumerMsgHandler)

func (*KafkaConsumer) SetNotificationHandler

func (kc *KafkaConsumer) SetNotificationHandler(handler KafkaConsumerNotificationHandler)

func (*KafkaConsumer) Start

func (kc *KafkaConsumer) Start() error

type KafkaConsumerErrorHandler

type KafkaConsumerErrorHandler func(err error)

type KafkaConsumerMsgHandler

type KafkaConsumerMsgHandler func(msg *sarama.ConsumerMessage) bool

type KafkaConsumerNotificationHandler

type KafkaConsumerNotificationHandler func(notification *cluster.Notification)

Jump to

Keyboard shortcuts

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