rabbitmqhandler

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

rabbitmq-helpers

Usage

Initialize your module
go mod init example.com/my-awesome-project
Get the go

Note that you need to include the v in the version tag.

go get github.com/revdfdev/rabbitmq-handler@v0.0.1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RabbitMQHandler

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

func NewRabbitMqHandler

func NewRabbitMqHandler(uri string) (*RabbitMQHandler, error)

func (*RabbitMQHandler) Close

func (r *RabbitMQHandler) Close() error

func (*RabbitMQHandler) Consume

func (r *RabbitMQHandler) Consume(
	exchangeName string,
	routingKey string,
	queueName string,
	deadLetterExchange string,
	deadLetterRoutingKey string,
	handler func(d rabbitmq.Delivery) (action rabbitmq.Action)) error

func (*RabbitMQHandler) DeadLetter

func (r *RabbitMQHandler) DeadLetter(deadLetterExchange string, deadLetterRoutingKey string, handler func(d rabbitmq.Delivery) (action rabbitmq.Action)) error

func (*RabbitMQHandler) Publish

func (r *RabbitMQHandler) Publish(exchangeName string, routingKey string, message []byte) error

func (*RabbitMQHandler) PublishWithHeaders

func (r *RabbitMQHandler) PublishWithHeaders(exchangeName string, routingKey string, message []byte, headers map[string]interface{}) error

Jump to

Keyboard shortcuts

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