Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RocketMQProducer rmqClient.Producer // 对外暴露RocketMq的生产者 RocketMQConsumer rmqClient.SimpleConsumer // 对外暴露RocketMq的消费者 )
Functions ¶
Types ¶
type RocketMQConfig ¶
type RocketMQConfig struct {
Topic string `json:"topic"` // Topic 主题
Endpoint string `json:"endpoint"` // Endpoint 端点
Namespace string `json:"nameSpace"` // 命名空间
GroupName string `json:"groupName"` // 组名
AccessKey string `json:"accessKey"` // AccessKey 访问密钥
SecretKey string `json:"secretKey"` // SecretKey 密钥
WaitTime int `json:"waitTime"` // 等待时间
}
func (*RocketMQConfig) InitRocketMQConsumers ¶
func (r *RocketMQConfig) InitRocketMQConsumers() error
InitRocketMQConsumers 初始化消费者
- @param ctx {context.Context} 上下文
- @param maxMessageNum {int32} 最大消息数
- @param invisibleDuration {int} 持续时间·单位s
func (*RocketMQConfig) InitRocketMqProducers ¶
func (r *RocketMQConfig) InitRocketMqProducers() error
InitRocketMqProducers 初始化rocketMq生产者
Click to show internal directories.
Click to hide internal directories.