rabbitmq

package
v0.0.0-...-72abcba Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchedulerQueue string = "mailowl-scheduler"
	BuilderQueue          = "mailowl-builder"
	EmailQueue            = "mailowl-email"
	SmsQueue              = "mailowl-sms"
)

Variables

This section is empty.

Functions

func AnnounceQueue

func AnnounceQueue(ch *amqp.Channel, name string, exchange string) (error, *amqp.Queue)

declare queue

Types

type Consumer

type Consumer struct {
	Conn  amqp.Connection
	Ch    *amqp.Channel
	Queue amqp.Queue
	// contains filtered or unexported fields
}

type Rabbit

type Rabbit struct {
	Conn *amqp.Connection
	// contains filtered or unexported fields
}

func NewRabbit

func NewRabbit(uri string, exchange string, log broker.Logger) (*Rabbit, error)

func (*Rabbit) NotifyClose

func (c *Rabbit) NotifyClose(log broker.Logger)

Die if the connect is lost (k8s reloaded this pod)

func (*Rabbit) Publish

func (c *Rabbit) Publish(msg broker.Message, queue string) error

TO DO: вынести публикацию в отдельный канал app, добавить хендлеры, которые будут разбирать этот канал

func (*Rabbit) Subscribe

func (c *Rabbit) Subscribe(event string, h broker.Handler) error

Jump to

Keyboard shortcuts

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