rabbitmq

package
v0.0.0-...-a23e254 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RabbitmqHost     = "amqp://guest:guest@localhost:5672/"
	QueueName        = "hello"
	ConsumerName     = ""
	Exchange         = "rpc_transaction"
	Durable          = false
	DeleteWhenUnused = false
	Exclusive        = false
	NoWait           = false
	AutoAck          = true
	NoLocal          = false
	Mandatory        = false
	Immediate        = false
	DelayExpiration  = "5000" // 设置5秒的队列过期时间, 这里仅仅用在延时队列设置当中
)

rabbitmq 的相关配置

Variables

This section is empty.

Functions

This section is empty.

Types

type Rabbitmq

type Rabbitmq struct{}

Rabbitmq 消息队列

func (Rabbitmq) Delay

func (rb Rabbitmq) Delay(key string, value string, expire string)

Delay 发送延时消息

func (Rabbitmq) Read

func (rb Rabbitmq) Read(f func(jsonStr []byte))

Read 向队列读取的方法

func (Rabbitmq) Send

func (rb Rabbitmq) Send(key string, value string)

Send 向队列发送的方法

Jump to

Keyboard shortcuts

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