Documentation
¶
Index ¶
Constants ¶
View Source
const MQURL = "amqp://guest:guest@localhost:5672/"
连接信息
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RabbitMQ ¶
type RabbitMQ struct {
//队列名称
QueueName string
//交换机名称
Exchange string
//bind Key 名称
Key string
//连接信息
Mqurl string
// contains filtered or unexported fields
}
rabbitMQ结构体
func NewRabbitMQ ¶
创建结构体实例
func NewRabbitMQTopic ¶
话题模式 创建RabbitMQ实例
func (*RabbitMQ) ReceiveTopic ¶
func (r *RabbitMQ) ReceiveTopic()
话题模式接受消息 要注意key,规则 其中“*”用于匹配一个单词,“#”用于匹配多个单词(可以是零个) 匹配 kuteng.* 表示匹配 kuteng.hello, kuteng.hello.one需要用kuteng.#才能匹配到
Click to show internal directories.
Click to hide internal directories.