consumer

package
v0.0.0-...-094815c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

Introduce

This is a simple example to show how to create a new consumer and consumer group

There can be both manual and automatic in the submission of consumption displacement

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BrokerList = []string{"localhost:9092"}
	Topic      = "jhd-test"
	GroupID    = "test"
)

Functions

func ConsumeAtomicCommit

func ConsumeAtomicCommit()

ConsumeAtomicCommit 同步消费(消费消息都是同步的) 自动位移提交(间隔为1s)

func ConsumeByGroup

func ConsumeByGroup()

func ConsumeManualCommit

func ConsumeManualCommit()

ConsumeManualCommit 同步消费 手动提交

Types

type GroupHandler

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

func (GroupHandler) Cleanup

func (GroupHandler) Cleanup(session sarama.ConsumerGroupSession) error

func (GroupHandler) ConsumeClaim

func (GroupHandler) Setup

Jump to

Keyboard shortcuts

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