consumer

package
v0.0.0-...-61d2b90 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelDelaySleep

func CancelDelaySleep()

CancelDelaySleep 触发退出

func NewConsumerGroup

func NewConsumerGroup(addrs []string, consumer *Consumer) error

Types

type Consumer

type Consumer struct {
	Group   string
	Topic   string
	PartNum int
}

func NewConsumer

func NewConsumer(group, topic string, num int) *Consumer

func (*Consumer) Cleanup

func (s *Consumer) Cleanup(session sarama.ConsumerGroupSession) error

func (*Consumer) ConsumeClaim

func (s *Consumer) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

mvcc、token、去重表

func (*Consumer) Setup

type PayloadDelay

type PayloadDelay struct {
	PushUnix int64  `json:"pushUnix"` // 秒
	PushTime string `json:"pushTime"` // 2021-3-11 16:14:17
	Payload  string `json:"payload"`  //
	Topic    string `json:"topic"`    // 到期之后放入的队列
}

PayloadDelay 延迟队列数据

func NewDefaultDelayPayload

func NewDefaultDelayPayload(payload string, topic string) PayloadDelay

NewDefaultDelayPayload 默认

Jump to

Keyboard shortcuts

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