rabbitmq

package
v0.0.0-...-3966bb1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RabbitMQ

type RabbitMQ struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue(opts queue.NewQueueOpts) (*RabbitMQ, error)

func (*RabbitMQ) Ack

func (r *RabbitMQ) Ack(ctx context.Context, msg queue.Message) error

func (*RabbitMQ) Close

func (r *RabbitMQ) Close(ctx context.Context)

func (*RabbitMQ) Nack

func (r *RabbitMQ) Nack(ctx context.Context, msg queue.Message, requeue bool) error

func (*RabbitMQ) Notify

func (r *RabbitMQ) Notify(ctx context.Context, wg *sync.WaitGroup) error

Notify should be called by publishers who wish to be notified of subscription errors.

func (*RabbitMQ) Publish

func (r *RabbitMQ) Publish(
	ctx context.Context,
	queueName string,
	msg []byte,
	headers map[string]interface{},
	expiration *string,
) error

func (*RabbitMQ) Start

func (r *RabbitMQ) Start(ctx context.Context, queueName string) error

func (*RabbitMQ) Subscribe

func (r *RabbitMQ) Subscribe(ctx context.Context, msgChan chan<- queue.Message, wg *sync.WaitGroup) error

Subscribe should be called by consumers.

Jump to

Keyboard shortcuts

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