Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueueConfig ¶
type RabbitConfig ¶
type RabbitConfig struct { URL string ReconnectDelay time.Duration Queues map[string]QueueConfig // Map of queues by name }
Configuration for RabbitMQ connection
func SetupRabbitMQConfig ¶
func SetupRabbitMQConfig() RabbitConfig
func (*RabbitConfig) GetAllExchanges ¶
func (r *RabbitConfig) GetAllExchanges() []Exchange
type RabbitMQProducer ¶
type RabbitMQProducer struct {
// contains filtered or unexported fields
}
RabbitMQProducer manages the connection and publishing to RabbitMQ
func NewRabbitMQProducer ¶
func NewRabbitMQProducer(config RabbitConfig) *RabbitMQProducer
NewRabbitMQProducer creates a new producer instance
func (*RabbitMQProducer) Close ¶
func (p *RabbitMQProducer) Close()
Close cleanly closes the channel and connection
func (*RabbitMQProducer) Run ¶
func (p *RabbitMQProducer) Run()
Run starts the connection and the publishing process
func (*RabbitMQProducer) SendMessage ¶
func (p *RabbitMQProducer) SendMessage(exchangeName, queueName, message string)
sendMessage sends a message to a specified queue
Click to show internal directories.
Click to hide internal directories.