rabbitmq

package
v1.9.15 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigInfo added in v1.0.20200708

type ConfigInfo struct {
	Addr     string
	UserName string
	Password string
	Port     string
}

type MessageHandler

type MessageHandler struct {
	QueueName  string
	Exchange   string
	Key        string
	Handler    func(exchange string, body []byte)
	AutoDelete bool
	RetryCount int
}

type RabbitMQ

type RabbitMQ struct {
	Url        string
	Conn       *amqp.Connection
	Handlers   []*MessageHandler
	RetryCount int
}

func Default

func Default() (*RabbitMQ, error)

func (*RabbitMQ) Consume

func (mq *RabbitMQ) Consume(exchange, key string, handler func(exchange string, body []byte)) error

func (*RabbitMQ) ConsumeAutoDelete added in v1.3.1119

func (mq *RabbitMQ) ConsumeAutoDelete(exchange, key string, handler func(exchange string, body []byte)) error

func (*RabbitMQ) SendMsg added in v1.4.1126

func (mq *RabbitMQ) SendMsg(exchange, key, msg string)

Jump to

Keyboard shortcuts

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