rocketmq

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer(conf *Config, topic, group string, fn mq.HandleFunc, opts ...mq.Option) (mq.Consumer, error)

Types

type Config

type Config struct {
	Addr   []string `yaml:"addr"`
	NsAddr []string `yaml:"ns_addr"`
}

type Producer

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

func NewProducer

func NewProducer(conf *Config, opts ...producer.Option) (*Producer, error)

func (*Producer) Close

func (p *Producer) Close() error

func (*Producer) SendMessage

func (p *Producer) SendMessage(ctx context.Context, topic, key, tag string, msg proto.Message, delayLvl int) error

type PullConsumer

type PullConsumer struct {
}

func (*PullConsumer) Start

func (c *PullConsumer) Start() error

func (*PullConsumer) Stop

func (c *PullConsumer) Stop() error

type PushConsumer

type PushConsumer struct {
	*mq.ConsumerMeta
	// contains filtered or unexported fields
}

func (*PushConsumer) Start

func (c *PushConsumer) Start() error

func (*PushConsumer) Stop

func (c *PushConsumer) Stop() error

Jump to

Keyboard shortcuts

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