rabbitmq

package
v0.86.32 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MAX_RETRY_COUNT = 15
View Source
const PUB_ACQUIRE_CHANNEL_RETRIES = 3
View Source
const RETRY_INTERVAL = 2 * time.Second
View Source
const RETRY_RESET_INTERVAL = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionResult added in v0.74.3

type CompressionResult struct {
	Payloads       [][]byte
	WasCompressed  bool
	OriginalSize   int
	CompressedSize int

	// CompressionRatio is the ratio of compressed size to original size (compressed / original)
	CompressionRatio float64
}

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, error)

New creates a new MessageQueueImpl.

func (*MessageQueueImpl) Clone

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

func (*MessageQueueImpl) IsReady

func (t *MessageQueueImpl) IsReady() bool

func (*MessageQueueImpl) RegisterTenant

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

func (*MessageQueueImpl) SendMessage added in v0.74.3

func (t *MessageQueueImpl) SendMessage(ctx context.Context, q msgqueue.Queue, msg *msgqueue.Message) 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 WithDeadLetterBackoff added in v0.74.3

func WithDeadLetterBackoff(backoff time.Duration) MessageQueueImplOpt

func WithDisableTenantExchangePubs

func WithDisableTenantExchangePubs(disable bool) MessageQueueImplOpt

func WithGzipCompression added in v0.74.3

func WithGzipCompression(enabled bool, threshold int) MessageQueueImplOpt

func WithLogger

func WithLogger(l *zerolog.Logger) MessageQueueImplOpt

func WithMaxPubChannels added in v0.74.3

func WithMaxPubChannels(maxConns int32) MessageQueueImplOpt

func WithMaxSubChannels added in v0.74.3

func WithMaxSubChannels(maxConns int32) 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