Documentation
¶
Index ¶
- Constants
- type MessageQueueImpl
- func (t *MessageQueueImpl) Clone() (func() error, msgqueue.MessageQueue, error)
- func (t *MessageQueueImpl) IsReady() bool
- func (t *MessageQueueImpl) SendMessage(ctx context.Context, q msgqueue.Queue, msg *msgqueue.Message) error
- func (t *MessageQueueImpl) SetQOS(prefetchCount int)
- func (t *MessageQueueImpl) Subscribe(q msgqueue.Queue, preAck msgqueue.MsgHandler, postAck msgqueue.MsgHandler) (func() error, error)
- type MessageQueueImplOpt
- func WithDeadLetterBackoff(backoff time.Duration) MessageQueueImplOpt
- func WithGzipCompression(enabled bool, threshold int) MessageQueueImplOpt
- func WithLogger(l *zerolog.Logger) MessageQueueImplOpt
- func WithMaxPubChannels(maxConns int32) MessageQueueImplOpt
- func WithMaxSubChannels(maxConns int32) MessageQueueImplOpt
- func WithMessageRejection(enabled bool, maxDeathCount int) MessageQueueImplOpt
- func WithQos(qos int) MessageQueueImplOpt
- func WithURL(url string) MessageQueueImplOpt
- type MessageQueueImplOpts
- type PubSub
- type PubSubOpt
- type PubSubOpts
Constants ¶
const MAX_RETRY_COUNT = 15
const PUB_ACQUIRE_CHANNEL_RETRIES = 3
const RETRY_INTERVAL = 2 * time.Second
const RETRY_RESET_INTERVAL = 30 * 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, 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) SendMessage ¶ added in v0.74.3
func (*MessageQueueImpl) SetQOS ¶
func (t *MessageQueueImpl) SetQOS(prefetchCount int)
func (*MessageQueueImpl) Subscribe ¶
func (t *MessageQueueImpl) Subscribe( q msgqueue.Queue, preAck msgqueue.MsgHandler, postAck msgqueue.MsgHandler, ) (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 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
}
type PubSub ¶ added in v0.98.9
type PubSub struct {
// contains filtered or unexported fields
}
PubSub implements msgqueue.PubSub over RabbitMQ. Tenant topics map to the legacy per-tenant fanout exchanges ("<uuid>_v1") and scheduler partition topics map to the scheduler's exclusive queue on the default exchange, so mixed-version fleets interoperate.
INVARIANT: the PubSub owns its AMQP connections and channel pools and never shares them with the durable MessageQueueImpl, since Pub can be called from within durable-write paths.
func NewPubSub ¶ added in v0.98.9
NewPubSub creates a new RabbitMQ-backed PubSub with its own connections and channel pools.
type PubSubOpt ¶ added in v0.98.9
type PubSubOpt func(*PubSubOpts)
func WithPubSubGzip ¶ added in v0.98.9
WithPubSubGzip enables gzip compression of payloads. Compression settings must match the durable MessageQueue's settings for wire compatibility, since both sides publish to the same tenant exchanges in mixed-version fleets.
func WithPubSubLogger ¶ added in v0.98.9
func WithPubSubMaxPubChannels ¶ added in v0.98.9
func WithPubSubMaxSubChannels ¶ added in v0.98.9
func WithPubSubURL ¶ added in v0.98.9
type PubSubOpts ¶ added in v0.98.9
type PubSubOpts struct {
// contains filtered or unexported fields
}