amqp

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package amqp provides consumer implementation with included tracing capabilities.

Deprecated: The AMQP consumer package along with the async component is superseded by the standalone `github.com/beatlabs/component/amqp` package. Please refer to the documents and the examples for the usage.

This package is frozen and no new functionality will be added.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

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

Exchange represents an AMQP exchange.

func NewExchange deprecated

func NewExchange(name, kind string) (*Exchange, error)

NewExchange validates its input and creates a new Exchange. name should be a non-empty string, kind should be one of: [direct, fanout, topic, headers].

Deprecated: The AMQP consumer package along with the async component is superseded by the standalone `github.com/beatlabs/component/amqp` package.

type Factory

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

Factory of an AMQP consumer.

func New deprecated

func New(url, queue string, exchange Exchange, oo ...OptionFunc) (*Factory, error)

New constructor.

Deprecated: The AMQP consumer package along with the async component is superseded by the standalone `github.com/beatlabs/component/amqp` package.

func (*Factory) Create

func (f *Factory) Create() (async.Consumer, error)

Create a new consumer.

type OptionFunc

type OptionFunc func(*consumer) error

OptionFunc definition for configuring the consumer in a functional way.

func Bindings

func Bindings(bindings ...string) OptionFunc

Bindings option for providing custom exchange-queue bindings.

func Buffer

func Buffer(buf int) OptionFunc

Buffer option for adjusting the incoming messages buffer.

func Requeue

func Requeue(requeue bool) OptionFunc

Requeue option for adjusting the requeue policy of a message.

func Timeout

func Timeout(timeout time.Duration) OptionFunc

Timeout option for adjusting the timeout of the connection.

Jump to

Keyboard shortcuts

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