Help us shape the future of Go! Take the 2026 Go Developer Survey

rabbitmq

package
v0.73.58 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_RETRY_COUNT = 15
View Source
const RETRY_INTERVAL = 2 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageQueueImpl

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

MessageQueueImpl implements MessageQueue interface using AMQP.

func New

func New(fs ...MessageQueueImplOpt) (func() error, *MessageQueueImpl)

New creates a new MessageQueueImpl.

func (*MessageQueueImpl) AddMessage

func (t *MessageQueueImpl) AddMessage(ctx context.Context, q msgqueue.Queue, msg *msgqueue.Message) error

AddMessage adds a msg to the queue.

func (*MessageQueueImpl) Clone

func (t *MessageQueueImpl) Clone() (func() error, msgqueue.MessageQueue)

func (*MessageQueueImpl) IsReady

func (t *MessageQueueImpl) IsReady() bool

func (*MessageQueueImpl) RegisterTenant

func (t *MessageQueueImpl) RegisterTenant(ctx context.Context, tenantId string) error

func (*MessageQueueImpl) SetQOS

func (t *MessageQueueImpl) SetQOS(prefetchCount int)

func (*MessageQueueImpl) Subscribe

func (t *MessageQueueImpl) Subscribe(
	q msgqueue.Queue,
	preAck msgqueue.AckHook,
	postAck msgqueue.AckHook,
) (func() error, error)

Subscribe subscribes to the msg queue.

type MessageQueueImplOpt

type MessageQueueImplOpt func(*MessageQueueImplOpts)

func WithDisableTenantExchangePubs

func WithDisableTenantExchangePubs(disable bool) MessageQueueImplOpt

func WithLogger

func WithLogger(l *zerolog.Logger) MessageQueueImplOpt

func WithMessageRejection added in v0.73.46

func WithMessageRejection(enabled bool, maxDeathCount int) MessageQueueImplOpt

func WithQos

func WithQos(qos int) MessageQueueImplOpt

func WithURL

func WithURL(url string) MessageQueueImplOpt

type MessageQueueImplOpts

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

Jump to

Keyboard shortcuts

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