aliyunmq

package
v2.1.41 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProducerPool sync.Map

Functions

func CloseProducer

func CloseProducer()

CloseProducer 关闭所有生产者而连接

func GetProducer

func GetProducer(configName string) (conn rocketmq.Producer)

GetProducer 获取生产者实例

func LogDebug

func LogDebug()

func LogError

func LogError()

func LogInfo

func LogInfo()

func LogWarn

func LogWarn()

func NewConsumer

func NewConsumer(configName, groupID string, option ...consumer.Option) rocketmq.PushConsumer

NewConsumer 初始化消费者

func NewProducer

func NewProducer(configName string, option ...producer.Option) rocketmq.Producer

NewProducer 初始化生产者

Types

type RocketMQConfig

type RocketMQConfig struct {
	// 设置 TCP 协议接入点,从阿里云 RocketMQ 控制台的实例详情页面获取。
	NameServer string
	// 命名空间(阿里云上的实例ID)
	Namespace string
	// 您在阿里云账号管理控制台中创建的 AccessKeyId,用于身份认证。
	AccessKey string
	// 您在阿里云账号管理控制台中创建的 AccessKeySecret,用于身份认证。
	SecretKey string
	// 是否自建RocketMQ true-自建 false-阿里云托管版。
	IsLocal bool
}

RocketMQConfig 基础配置

Jump to

Keyboard shortcuts

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