amqputils

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package amqputils contains the AMQP consumer utils

Package amqputils contains the AMQP producer utils

Package amqputils contains the AMQP utils

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConfig = errors.New("amqp consumer configuration is incomplete")

ErrInvalidConfig marks a configuration failure that retrying cannot fix. It is deliberately fatal: see the panic in InitConsumerAMQP.

View Source
var Messages <-chan amqp.Delivery

Messages is the channel for the AMQP messages

Functions

func AreConsumerChannelsReady

func AreConsumerChannelsReady() bool

AreConsumerChannelsReady checks if the consumer channels are ready to receive messages

func CloseConsumerConnection

func CloseConsumerConnection()

CloseConsumerConnection closes the consumer AMQP connection

func CloseProducerConnection

func CloseProducerConnection()

CloseProducerConnection closes the producer AMQP connection

func GetConsumerConnectionStatus

func GetConsumerConnectionStatus() map[string]interface{}

GetConsumerConnectionStatus returns the status of the consumer connection for debugging

func InitConsumerAMQP

func InitConsumerAMQP(workerName string)

InitConsumerAMQP initializes the AMQP consumer

func InitProducerAMQP

func InitProducerAMQP(workerName string)

InitProducerAMQP initializes the AMQP producer

func IsConsumerConnectionHealthy

func IsConsumerConnectionHealthy() bool

IsConsumerConnectionHealthy checks if the consumer AMQP connection is healthy

func IsProducerConnectionHealthy

func IsProducerConnectionHealthy() bool

IsProducerConnectionHealthy checks if the producer AMQP connection is healthy

func PublishMessage

func PublishMessage(exchangeName string, topic string, message map[string]interface{}, headers *amqp.Table)

PublishMessage publishes a message to the AMQP broker, logging (not returning) any failure

func RunConsumer

func RunConsumer(workerName string, handler func(*amqp.Delivery) amqpinterfaces.MessageOutcome)

func TryPublishMessage

func TryPublishMessage(exchangeName string, topic string, message map[string]interface{}, headers *amqp.Table) error

TryPublishMessage publishes a message to the AMQP broker and reports failures. A nil error means the message was handed to the channel (no publisher confirms).

Types

This section is empty.

Jump to

Keyboard shortcuts

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