rabbitmq

package
v0.0.0-...-730ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TOPIC   = "topic"
	DELAYED = "x-delayed-message"
)

Variables

This section is empty.

Functions

func NewBroker

func NewBroker(opts *broker.Options) broker.Broker

Types

type Consumer

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

func (*Consumer) GroupID

func (cr *Consumer) GroupID() string

func (*Consumer) SetDurableQueue

func (cr *Consumer) SetDurableQueue(durableQueue bool)

func (*Consumer) SetHeaders

func (cr *Consumer) SetHeaders(headers map[string]interface{})

func (*Consumer) SetQueueArgs

func (cr *Consumer) SetQueueArgs(queueArgs map[string]interface{})

func (*Consumer) Subscribe

func (cr *Consumer) Subscribe(topic string, handler broker.Handler) error

func (*Consumer) Topic

func (cr *Consumer) Topic() string

func (*Consumer) Unsubscribe

func (cr *Consumer) Unsubscribe() error

type Event

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

func (*Event) Ack

func (evt *Event) Ack() error

func (*Event) Error

func (evt *Event) Error() error

func (*Event) Message

func (evt *Event) Message() *broker.Message

func (*Event) Topic

func (evt *Event) Topic() string

type Producer

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

func (*Producer) Publish

func (pr *Producer) Publish(topic string, msg *broker.Message) error

func (*Producer) SetPublish

func (pr *Producer) SetPublish(publishing amqp.Publishing)

Jump to

Keyboard shortcuts

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