amqp10

package
v0.0.0-...-2f2621b Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQP10Connector

type AMQP10Connector struct {
	Address              string
	ClientName           string
	SendTimeout          int64
	ListenPrefetch       int64
	LinkFailureLimit     int64
	MaxParallelSendLimit int64
	// contains filtered or unexported fields
}

AMQP10Connector is the object to be used for communication with AMQP-1.0 entity

func ConnectAMQP10

func ConnectAMQP10(appName string, cfg config.Config, logger *logging.Logger) (*AMQP10Connector, error)

ConnectAMQP10 creates new AMQP1.0 connector from the given configuration file

func CreateAMQP10Connector

func CreateAMQP10Connector(
	logger *logging.Logger,
	address string,
	clientName string,
	appName string,
	sendTimeout int64,
	linkFailureLimit int64,
	maxParallelLimit int64,
	listenPrefetch int64,
	listenChannels []string,
) (*AMQP10Connector, error)

CreateAMQP10Connector creates the connector and connects to given AMQP1.0 service

func (*AMQP10Connector) Connect

func (conn *AMQP10Connector) Connect() error

Connect creates input and output connection container for given appname for configured AMQP1.0 node

func (*AMQP10Connector) CreateReceiver

func (conn *AMQP10Connector) CreateReceiver(address string, prefetch int) error

CreateReceiver creates electron.Receiver for given address

func (*AMQP10Connector) CreateSender

func (conn *AMQP10Connector) CreateSender(address string) (*amqp.Sender, error)

CreateSender creates electron.Sender for given address

func (*AMQP10Connector) Disconnect

func (conn *AMQP10Connector) Disconnect()

Disconnect closes connection in both directions

func (*AMQP10Connector) Reconnect

func (conn *AMQP10Connector) Reconnect(connectionType string, msgChannel chan interface{}, wg *sync.WaitGroup) error

Reconnect tries to reconnect connector to configured AMQP1.0 node. Returns nil if failed

func (*AMQP10Connector) Start

func (conn *AMQP10Connector) Start(outchan chan interface{}, inchan chan interface{}) *sync.WaitGroup

Start starts all processing loops. Channel outchan will contain received AMQP10Message from AMQP1.0 node and through inchan AMQP10Message are sent to configured AMQP1.0 node

type AMQP10Message

type AMQP10Message struct {
	Address string
	Body    string
	// contains filtered or unexported fields
}

AMQP10Message holds received (or to be sent) messages from (to) AMQP-1.0 entity

func (*AMQP10Message) SetIdFromCounter

func (m *AMQP10Message) SetIdFromCounter(counter *uint64)

SetIdFromCounter sets message id from shared counter

Jump to

Keyboard shortcuts

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