messaging

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorrelationIdMiddleware

func CorrelationIdMiddleware(h message.HandlerFunc) message.HandlerFunc

func ErrorLoggerMiddleware

func ErrorLoggerMiddleware(logger *logs.Logger) func(h message.HandlerFunc) message.HandlerFunc

func NewHeader

func NewHeader(eventName, serviceName string) *events.Header

Types

type AmqpPublisher

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

func NewAmqpPublisher

func NewAmqpPublisher(amqpUrl string, logger *logs.Logger) (AmqpPublisher, error)

func (AmqpPublisher) Close

func (p AmqpPublisher) Close() error

func (AmqpPublisher) Publish

func (p AmqpPublisher) Publish(topic string, messages ...*message.Message) error

type CorrelationIdPublisher

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

func NewCorrelationIdPublisher

func NewCorrelationIdPublisher(publisher message.Publisher) CorrelationIdPublisher

func (CorrelationIdPublisher) Close

func (c CorrelationIdPublisher) Close() error

func (CorrelationIdPublisher) Publish

func (c CorrelationIdPublisher) Publish(topic string, messages ...*message.Message) error

type Publisher

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

func NewPublisher

func NewPublisher(config amqp.Config, logger watermill.LoggerAdapter) (*Publisher, error)

func (*Publisher) Close

func (p *Publisher) Close() error

func (*Publisher) Publish

func (p *Publisher) Publish(topic string, event any) error

Jump to

Keyboard shortcuts

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