Documentation ¶
Index ¶
- func NewMQ() mq.IReactMQ
- type RabbitMQ
- func (this *RabbitMQ) Close()
- func (this *RabbitMQ) Connect(mode mq.Mode, strURL string) (err error)
- func (this *RabbitMQ) Consume(strBindingKey, strQueueName string, handler mq.ReactHandler) (err error)
- func (this *RabbitMQ) Debug(enable bool)
- func (this *RabbitMQ) GetAdapter() (adapter mq.Adapter)
- func (this *RabbitMQ) IsClosed() bool
- func (this *RabbitMQ) Publish(strBindingKey, strQueueName, key string, value string) (err error)
- func (this *RabbitMQ) Reconnect() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RabbitMQ ¶
type RabbitMQ struct {
// contains filtered or unexported fields
}
func (*RabbitMQ) Consume ¶
func (this *RabbitMQ) Consume(strBindingKey, strQueueName string, handler mq.ReactHandler) (err error)
* @brief 消息消费接口定义 * @param strBindingKey 队列绑定Key * @param strQueueName 队列名称 * @param handler 消费回调处理对象 * @return err 成功返回nil,失败返回返回具体错误信息 * @remark 服务器异常或重启时内部会自动重连服务器
func (*RabbitMQ) GetAdapter ¶ added in v1.0.9
* @brief 获取当前MQ类型 * @param adapter MQ类型
Click to show internal directories.
Click to hide internal directories.