rocketmqx

package
v0.0.0-...-774e91b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Endpoint      string `json:"endpoint"`       // 连接地址
	AccessKey     string `json:"accessKey"`      // 账号
	SecretKey     string `json:"secretKey"`      // 密码
	ProducerGroup string `json:"producer_group"` // 生产者群组
	ConsumerGroup string `json:"consumer_group"` // 消费者群组
	Level         string `json:"level"`          // 日志等级
	AwaitDuration int    `json:"await_duration"` // 接受消息最大等待时间 默认5秒
}

Cfg RocketMQ5.0配置,请使用最新的5.0

func Load

func Load(cli *clientv3.Client, env string) *Cfg

func (*Cfg) NewConsumer

func (c *Cfg) NewConsumer() client.SimpleConsumer

func (*Cfg) NewProducer

func (c *Cfg) NewProducer() client.Producer

func (*Cfg) SetConsumerGroup

func (c *Cfg) SetConsumerGroup(s string) *Cfg

func (*Cfg) SetProducerGroup

func (c *Cfg) SetProducerGroup(s string) *Cfg

Jump to

Keyboard shortcuts

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