Versions in this module Expand all Collapse all v0 v0.2.0 Jun 21, 2024 v0.1.0 Jun 19, 2024 Changes in this version + func GetWatermillUUID(msg *amqp.Message) any + func IsConnErr(err error) bool + func Marshal(msg *message.Message) (*amqp.Message, error) + func Unmarshal(amqpMsg *amqp.Message) (*message.Message, error) + type Config struct + Host string + Password string + Port int + Publish PublishConfig + Subscribe SubscribeConfig + TLSConfig *tls.Config + Username string + type ConnectionWrapper struct + func NewConnection(ctx context.Context, config Config) (*ConnectionWrapper, error) + func (c *ConnectionWrapper) Close() error + type PublishConfig struct + Capabilities []string + Durable bool + type Publisher struct + func NewPublisher(ctx context.Context, config Config) (*Publisher, error) + func NewPublisherWithConnection(ctx context.Context, config Config, conn *ConnectionWrapper) (*Publisher, error) + func (p *Publisher) Close() error + func (p *Publisher) CloseSenders() + func (p *Publisher) Publish(topic string, messages ...*message.Message) error + type SubscribeConfig struct + Capabilities []string + Durable bool + QueueName string + type Subscriber struct + func NewSubscriber(ctx context.Context, config Config) (*Subscriber, error) + func NewSubscriberWithConnection(ctx context.Context, config Config, conn *ConnectionWrapper) (*Subscriber, error) + func (s *Subscriber) Close() error + func (s *Subscriber) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error) + func (s *Subscriber) SubscribeInitialize(topic string) error