kafka

package
v0.0.0-...-f283956 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchConsumerHandler

type BatchConsumerHandler[T any] struct {
	// contains filtered or unexported fields
}

BatchConsumerHandler 消费者

func NewBatchConsumerHandler

func NewBatchConsumerHandler[T any](fn func(allMsg []*sarama.ConsumerMessage, allData []T) error) *BatchConsumerHandler[T]

func (BatchConsumerHandler[T]) Cleanup

func (h BatchConsumerHandler[T]) Cleanup(session sarama.ConsumerGroupSession) error

func (BatchConsumerHandler[T]) ConsumeClaim

func (BatchConsumerHandler[T]) Setup

type Consumer

type Consumer interface {
	Start() error
}

type ConsumerHandler

type ConsumerHandler[T any] struct {
	// contains filtered or unexported fields
}

ConsumerHandler 消费者

func NewConsumerHandler

func NewConsumerHandler[T any](fn func(msg *sarama.ConsumerMessage, data T) error) *ConsumerHandler[T]

func (ConsumerHandler[T]) Cleanup

func (h ConsumerHandler[T]) Cleanup(session sarama.ConsumerGroupSession) error

func (ConsumerHandler[T]) ConsumeClaim

func (h ConsumerHandler[T]) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

func (ConsumerHandler[T]) Setup

func (h ConsumerHandler[T]) Setup(session sarama.ConsumerGroupSession) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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