amqp

package
v0.0.0-...-e03aae4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

nolint:dupl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(connection []string, logger log.Logger) (*cony.Client, error)

func NewConsumer

func NewConsumer(client *cony.Client, queue *cony.Queue, logger log.Logger) *cony.Consumer

func NewPublisher

func NewPublisher(client *cony.Client, exchange, routingKey string,
	confirmTimeout time.Duration, logger log.Logger) *cony.Publisher

Types

type PublishJournal

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

PublishJournal is log of unpublished messages to RabbitMQ with the aim of storing locally Publishings that cannot be published at the time

func NewPublishJournal

func NewPublishJournal(path string, replayTimeout time.Duration,
	amqpConnStrs []string, logger log.Logger) (*PublishJournal, error)

func (*PublishJournal) GetAll

func (j *PublishJournal) GetAll() []*Publishing

func (*PublishJournal) Insert

func (j *PublishJournal) Insert(p *Publishing) (err error)

Insert inserts Publishing to journal

func (*PublishJournal) Stop

func (j *PublishJournal) Stop()

Stop stops PublishJournal Stop waits until all its tasks finished

func (*PublishJournal) Stopped

func (j *PublishJournal) Stopped() bool

type Publishing

type Publishing struct {
	Exchange   string
	RoutingKey string
	Body       []byte
	RequestID  string
}

Publishing represents an unpublished messages to RabbitMQ

Jump to

Keyboard shortcuts

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