Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiPublish ¶
Publish multiple messages to the specified topic with a given delay.
func SetupProducers ¶
Setup producers with the given nsqdAddr and poolSize.
Types ¶
type Consumer ¶
type Consumer struct {
Topic string
Channel string
Concurrency int
Config *nsq.Config
// contains filtered or unexported fields
}
Consumer is a wrapper for go-nsq Consumer.
func NewConsumer ¶
func NewConsumer(topic, channel string, concurrency int, jobGenerator JobGenerator) (c *Consumer)
Create a new Consumer with a given topic, channel, concurrency and JobGenerator.
func (*Consumer) ConnectToNSQLookupd ¶
Create the go-nsq Consumer, adds handler and connects to nsq.
type JobGenerator ¶
JobGenerator is a convenience type that processes the payload, and returns a stateful Job and error.
type Worker ¶
Worker start and stop multiple consumers.
func (*Worker) AddConsumer ¶
Add a consumer to this worker.
Click to show internal directories.
Click to hide internal directories.