rocketmq

package
v0.0.0-...-0948bf3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataRocketmqTag         = "rocketmq-tag"
	MetadataRocketmqKey         = "rocketmq-key"
	MetadataRocketmqShardingKey = "rocketmq-shardingkey"
)

Variables

This section is empty.

Functions

func NewNormalPublisher

func NewNormalPublisher(producerOptions []mqp.Option, opts ...PubOption) (*normalPublisher, error)

NewNormalPublisher 函数用于创建一个 normalPublisher 结构体实例

func NewNormalRocketMQ

func NewNormalRocketMQ(producerOptions []mqp.Option, consumerOptions []mqc.Option, opts ...PubOption) (*normalRocket, error)

NewNormalRocketMQ 函数用于创建一个 rocketMQ 结构体实例

func NewPubOptions

func NewPubOptions() *pubOptions

NewPubOptions new options struct

func NewSubscriber

func NewSubscriber(opts ...mqc.Option) (*subscriber, error)

func NewTransactionPublisher

func NewTransactionPublisher(
	producerOptions []mqp.Option,
	checkLocalTransaction func(ext *primitive.MessageExt) primitive.LocalTransactionState,
	opts ...PubOption,
) (*transactionPublisher, error)

func NewTransactionRocketMQ

func NewTransactionRocketMQ(
	producerOptions []mqp.Option,
	consumerOptions []mqc.Option,
	checkLocalTransaction func(ext *primitive.MessageExt) primitive.LocalTransactionState,
	opts ...PubOption,
) (*transactionRocket, error)

func PrintPubOptions

func PrintPubOptions(packageName string)

Types

type Metadata

type Metadata map[string]string

type Producer

type Producer interface {
	Start() error
	Shutdown() error
}

type PubOption

type PubOption interface {
	// contains filtered or unexported methods
}

PubOption option interface

func SkipPubOption

func SkipPubOption() PubOption

func WithPubGetMetadata

func WithPubGetMetadata(getMetadata func(e *pb.Event) Metadata) PubOption

WithPubGetMetadata getMetadata option of pubConfig

func WithPubOptions

func WithPubOptions(o *pubOptions) PubOption

Jump to

Keyboard shortcuts

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