Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(p *Publisher)
Option allows to configure RabbitMQ Publisher.
func WithConstHeaders ¶
WithConstHeaders sets constant publishing headers, that will be added to all publishings.
func WithExpiration ¶
WithExpiration sets publishing Expire property.
func WithImmediate ¶
func WithImmediate() Option
WithImmediate sets server to discard a message when no consumer on the matched queue is ready to accept the delivery and server will return an undeliverable message with a Return method. See https://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.publish.immediate.
func WithMandatory ¶
func WithMandatory() Option
WithMandatory sets server to discard a message if no queue is bound that matches the routing key and server will return an undeliverable message with a Return method. See https://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.publish.mandatory.
func WithTransientDeliveryMode ¶
func WithTransientDeliveryMode() Option
WithTransientDeliveryMode sets publishing to the Transient delivery mode. Transient means higher throughput but messages will not be restored on broker restart. See https://github.com/rabbitmq/amqp091-go/blob/main/types.go#L123.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher is a Publisher to RabbiMQ.