Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Capability = &intf.Capability{ Category: intf.ProviderCategoryMq, Name: intf.ProviderNameMqRabbitMq, Module: fx.Module( string(intf.ProviderNameMqRabbitMq), fx.Provide(New), ), }
Functions ¶
func New ¶
func New(configProvider intf.ConfigProvider, logger intf.LoggerProvider) (intf.MessageQueueProvider, error)
Types ¶
type ConnectionConfig ¶
type RabbitMqConfig ¶
type RabbitMqConfig struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Vhost string `mapstructure:"vhost"` // Consumer: Whether or not to requeue when sending a negative acknowledgement in case of a failure. RequeueInFailure bool `mapstructure:"requeue_in_failure"` // Consumer: In order to defeat that we can set the prefetch count with the value of 1. // This tells RabbitMQ not to give more than one message to a worker at a time. // Or, in other words, don't dispatch a new message to a worker until it has // processed and acknowledged the previous one. // Instead, it will dispatch it to the next worker that is not still busy. PrefetchCount int `mapstructure:"prefetch_count"` // connection: ChannelPoolSize specifies the size of a channel pool. All channels in the pool are opened when the publisher is // created. When a Publish operation is performed then a channel is taken from the pool to perform the operation and // then returned to the pool once the operation has finished. If all channels are in use then the Publish operation // waits until a channel is returned to the pool. // If this value is set to 0 (default) then channels are not pooled and a new channel is opened/closed for every // Publish operation. ChannelPoolSize int `mapstructure:"channel_pool_size"` }
type Topology ¶
type Topology struct { Kind TopologyKind ExchangeKind ExchangeKind ExchangeName string QueueName string RoutingKey string BindingKey string }
func (*Topology) DeclareExchange ¶
type TopologyKind ¶ added in v2.0.4
type TopologyKind int
const ( TopologyKindDefault TopologyKind = iota // default topology TopologyKindDelay // delay topology kind )
Click to show internal directories.
Click to hide internal directories.