rabbitmq

package
v4.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(session *RabbitMQ) error

Types

type Events added in v4.8.0

type Events = map[messages.Key][]events.Consumer

type Queues added in v4.8.0

type Queues = map[messages.Key]*Recipient

type RabbitMQ

type RabbitMQ struct {
	*amqp.Connection
	*amqp.Channel
	loggers.Logger
	ConsumeCycle context.Context
	// contains filtered or unexported fields
}

func Open

func Open(uri string, exchange string, queues Queues, logger loggers.Logger, consumeCycle context.Context) (*RabbitMQ, error)

func (*RabbitMQ) AddExchange added in v4.8.0

func (r *RabbitMQ) AddExchange(name string) error

func (*RabbitMQ) AddQueue

func (r *RabbitMQ) AddQueue(name messages.Recipient) error

func (*RabbitMQ) AddQueueEventBind added in v4.8.0

func (r *RabbitMQ) AddQueueEventBind(queue messages.Recipient, bindingKey, routingKey messages.Key, attributes, meta reflect.Type) error

func (*RabbitMQ) Consume added in v4.9.1

func (r *RabbitMQ) Consume(key messages.Key, queue *Recipient, deliveries <-chan amqp.Delivery, consumer events.Consumer)

func (*RabbitMQ) Publish added in v4.8.0

func (r *RabbitMQ) Publish(event *messages.Message) error

func (*RabbitMQ) Subscribe added in v4.8.0

func (r *RabbitMQ) Subscribe(key messages.Key, consumer events.Consumer) error

func (*RabbitMQ) Unmarshal added in v4.8.0

func (r *RabbitMQ) Unmarshal(data []byte, attributes, meta reflect.Type, event *messages.Message) error

type Recipient added in v4.8.0

type Recipient struct {
	Name             messages.Recipient
	BindingKey       messages.Key
	Attributes, Meta reflect.Type
}

Jump to

Keyboard shortcuts

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