routing

package
v0.0.0-...-b9ba31e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MQURL = "amqp://lzr:123qwe@127.0.0.1:5672/example"

MQURL 连接信息amqp://lzr:123qwe@127.0.0.1:5672/hello_world 这个信息是固定不变的amqp://事固定参数后面两个是用户名密码ip地址端口号Virtual Host

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 rabbitMQ结构体

func NewRabbitMQ

func NewRabbitMQ(queueName string, exchange string, key string) *RabbitMQ

func NewRabbitMQInstance

func NewRabbitMQInstance(exchangeName string, routingKey string) *RabbitMQ

func (*RabbitMQ) Close

func (r *RabbitMQ) Close()

Close 关闭mq

func (*RabbitMQ) Consume

func (r *RabbitMQ) Consume()

Consume 消费消息

func (*RabbitMQ) Publish

func (r *RabbitMQ) Publish(message string)

Publish 生产消息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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