Documentation
¶
Index ¶
- Constants
- func ConfigureExchanges(channel *rabbit.Channel, options *Options) error
- func ConfigureQueues(channel *rabbit.Channel, options *Options) error
- func PublishMessage(params *PublishParams) error
- type Consumer
- type Delivery
- type Logger
- type Options
- func (o *Options) GetConnectionName() string
- func (o *Options) GetDeadQueueName() string
- func (o *Options) GetDelayQueueName() string
- func (o *Options) GetQueueName() string
- func (o *Options) GetRetryDelay() int32
- func (o *Options) GetRetryLimit() int32
- func (o *Options) GetServiceExchangeName() string
- type ProcessorFunc
- type Publish
- type PublishParams
- type Publisher
- func (p *Publisher) Close()
- func (p *Publisher) ExchangeDeclare(exchange string) error
- func (p *Publisher) Publish(params *PublishParams) error
- func (p *Publisher) PublishWithContext(ctx context.Context, params *PublishParams) error
- func (p *Publisher) SetConnectionName(connName string)
- func (p *Publisher) SetLogger(l Logger)
- type PublisherOptions
Constants ¶
View Source
const ( StateListening = "listening" StateNotListening = "not-listening" ReconnectionAttempts = 50 ReconnectionDelayDuration = 2 * time.Second PrefetchCount = 1 PrefetchSize = 0 Global = true ConsumerName = "tackle-consumer" Durable = true Exclusive = false AutoAck = false AutoDeleted = false Internal = false NoWait = false NoLocal = false )
View Source
const ( DefaultRetryLimit = 10 DefaultRetryDelay = 10 )
View Source
const (
DeadLetterTimeout = 604_800_000 // 1 week
)
Variables ¶
This section is empty.
Functions ¶
func PublishMessage ¶
func PublishMessage(params *PublishParams) error
Types ¶
type Consumer ¶
type Consumer struct { State string // contains filtered or unexported fields }
func NewConsumer ¶
func NewConsumer() *Consumer
type Options ¶
type Options struct { URL string ConnectionName string RemoteExchange string Service string RoutingKey string RetryDelay int32 RetryLimit int32 OnDeadFunc func(Delivery) }
func (*Options) GetConnectionName ¶
func (*Options) GetDeadQueueName ¶
func (*Options) GetDelayQueueName ¶
func (*Options) GetQueueName ¶
func (*Options) GetRetryDelay ¶
func (*Options) GetRetryLimit ¶
func (*Options) GetServiceExchangeName ¶
type ProcessorFunc ¶
type Publish ¶
type Publish interface {
Publish(*PublishParams) error
}
type PublishParams ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func NewPublisher(amqpURL string, options PublisherOptions) (*Publisher, error)
func (*Publisher) ExchangeDeclare ¶
func (*Publisher) Publish ¶
func (p *Publisher) Publish(params *PublishParams) error
func (*Publisher) PublishWithContext ¶
func (p *Publisher) PublishWithContext(ctx context.Context, params *PublishParams) error
func (*Publisher) SetConnectionName ¶
type PublisherOptions ¶
Click to show internal directories.
Click to hide internal directories.