kafka

package
v0.0.0-...-aa82ca8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomConsumerGroupHandler

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

CustomConsumerGroupHandler 自定义消费句柄

func NewCustomConsumerGroupHandler

func NewCustomConsumerGroupHandler(cfg *conf.KafkaConfig) (*CustomConsumerGroupHandler, error)

NewCustomConsumerGroupHandler 新建消费者.

func (*CustomConsumerGroupHandler) Cleanup

Cleanup sarama.ConsumerGroupHandler接口定义实现. Cleanup() hook is called to allow the user to perform any final tasks before a rebalance once all the ConsumeClaim() loops have exited.

func (*CustomConsumerGroupHandler) Close

func (h *CustomConsumerGroupHandler) Close()

Close 关闭并释放所有资源 (并发安全).

func (*CustomConsumerGroupHandler) ConsumeClaim

ConsumeClaim sarama.ConsumerGroupHandler接口定义实现. ConsumeClaim() hook is called for each of the assigned claims.

func (*CustomConsumerGroupHandler) Msg

Msg 返回消费通道.

func (*CustomConsumerGroupHandler) Setup

Setup sarama.ConsumerGroupHandler接口定义实现. Setup() hook is called to notify the user of the claims and allow any necessary preparation or alteration of state.

Jump to

Keyboard shortcuts

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