message

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extra

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

func NewExtra

func NewExtra(message pulsar.Message) *Extra

type Handler

type Handler[T any] interface {
	// Peek 取出一个新的消息
	Peek() T

	// Process 处理消息
	Process(context context.Context, msg T, extra *Extra) (err error)
}

type Id

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

func NewId

func NewId(id pulsar.MessageID) *Id

type Status

type Status int

Status 消费状态

const (
	// StatusUnknown 默认消费状态
	StatusUnknown Status = 0
	// StatusSuccess 消费成功,会从队列中删除消息
	StatusSuccess Status = 1
	// StatusLater 延迟消费,等待下一次消费
	StatusLater Status = 2
)

Jump to

Keyboard shortcuts

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