kafka

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	queue.Options
	Brokers      []string
	GroupID      string
	KafkaVersion string
}

Options struct

type Queue

type Queue struct {
	*queue.Base
	Options
	// contains filtered or unexported fields
}

Queue struct

func New

func New(opts Options) *Queue

New return queue base kafka

func (*Queue) Cleanup

func (q *Queue) Cleanup(sarama.ConsumerGroupSession) error

Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited

func (*Queue) ConsumeClaim

func (q *Queue) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().

func (*Queue) Run

func (q *Queue) Run()

Run use for queue run

func (*Queue) Setup

Setup is run at the beginning of a new session, before ConsumeClaim

Jump to

Keyboard shortcuts

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