rabbitmq

package
v0.0.0-...-3751425 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindQueueToExchange

func BindQueueToExchange(c *amqp.Channel, q *amqp.Queue, exchangeName, key string) error

func Connect

func Connect() (*amqp.Connection, *amqp.Channel, error)

Connect to amqp keep it open and return open channel

func ConnectDeclare

func ConnectDeclare(eName, qName, key, kind string) (*amqp.Connection, *amqp.Channel, error)

ConnectDeclare create queue and bind to exchange

func Consumer

func Consumer(eName, qName, key, kind string, f func([]byte)) error

Consumer create exchange and queue connection and handle delivery data

func DeclareExchange

func DeclareExchange(c *amqp.Channel, eName string, kind string) error

func QueueDeclare

func QueueDeclare(c *amqp.Channel, queueName string) (*amqp.Queue, error)

func SendMessage

func SendMessage(eName, qName, key, kind string, msg []byte) error

SendMessage message to broker

Types

type Config

type Config struct {
	Host     string
	Port     string
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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