queue

package
v1.0.40 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestRabbitMQConnection

func TestRabbitMQConnection(config Config) error

TestRabbitMQConnection tries to connect to specified rabbitQM broker

Types

type Config

type Config interface {
	GetHost() string
	GetPort() int
	GetUser() string
	GetPassword() string
	GetDatabase() string
}

Config Interface With Methods to be a database config

type RabbitMQ

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

func NewRabbitMQ

func NewRabbitMQ(config Config) (*RabbitMQ, error)

NewRabbitMQ creates a nem instance on RabbitMQ

func NewRabbitTopic added in v1.0.39

func NewRabbitTopic(config Config) (*RabbitMQ, error)

func (*RabbitMQ) Close

func (r *RabbitMQ) Close()

Close closes the rabbit connection and the channel

func (*RabbitMQ) CloseChannel

func (r *RabbitMQ) CloseChannel()

CloseChannel closes the rabbit channel

func (*RabbitMQ) CloseConnect

func (r *RabbitMQ) CloseConnect()

CloseConnect closes the rabbit connection

func (*RabbitMQ) GetChannel

func (r *RabbitMQ) GetChannel() *amqp.Channel

func (*RabbitMQ) Publish

func (r *RabbitMQ) Publish(data interface{}) error

Publish sends a message to Rabbit queue

func (*RabbitMQ) PublishToTopic added in v1.0.39

func (r *RabbitMQ) PublishToTopic(data interface{}, exchangeName, routingKey string) error

Publish message to a topic exchange

Jump to

Keyboard shortcuts

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