Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "1.2.1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
AmqpURI string
Exchange string
ExchangeType string
QueueName string
Key string
MessageTTL int32 // How long to retain messages in the queue
Durable bool // Queue durable?
Prefetch int
}
Config is the settings for the consumer
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer holds state for the AMQP consumer
func NewConsumer ¶
NewConsumer create and configure a new consumer, this also triggers a connection to AMQP server
type ConsumerPool ¶ added in v1.2.1
type ConsumerPool struct {
// contains filtered or unexported fields
}
ConsumerPool container for consumers
func NewConsumerPool ¶ added in v1.2.1
func NewConsumerPool(numWorkers int, consumerNamePrefix string, punterConfig *Config, msgHandler MsgHander) (*ConsumerPool, error)
NewConsumerPool create a pool of consumers for a given configuration.
func (*ConsumerPool) Shutdown ¶ added in v1.2.1
func (pool *ConsumerPool) Shutdown()
Shutdown closes all the consumers in the pool.
Click to show internal directories.
Click to hide internal directories.