rabbit

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMQ

func NewMQ() mq.IReactMQ

Types

type RabbitMQ

type RabbitMQ struct {
	// contains filtered or unexported fields
}

func (*RabbitMQ) Connect

func (this *RabbitMQ) Connect(mode mq.Mode, strURL string) (err error)

func (*RabbitMQ) Consume

func (this *RabbitMQ) Consume(strBidingKey, strQueueName string, cb mq.FnConsumeCb) (err error)

func (*RabbitMQ) Debug

func (this *RabbitMQ) Debug(enable bool)

* @brief 开启或关闭调式模式 * @param enable true开启/false关闭

func (*RabbitMQ) IsClosed

func (this *RabbitMQ) IsClosed() bool

判定是否服务器重启断开客户端连接

func (*RabbitMQ) Publish

func (this *RabbitMQ) Publish(strRoutingKey, strData string) (err error)

func (*RabbitMQ) Reconnect

func (this *RabbitMQ) Reconnect() (err error)

当调用Publish返回错误并且IsClosed()返回true时,可调用此方法发起重连

Jump to

Keyboard shortcuts

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