Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxTimeNoRead = errors.New("no messages available in the queue for more than the max time")
ErrMaxTimeNoRead is returned by a queue reader when there were no messages available in the queue for more than the configured amount of time.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// Body contains the body of the message to be processed.
Body string
// TimesRead contains the number of times this concrete message has been
// read so far.
TimesRead int
}
Message defines the information a queue reader passes to a processor about a message.
type MessageProcessor ¶
type MessageProcessor interface {
FreeTokens() chan interface{}
ProcessMessage(msg Message, token interface{}) <-chan bool
}
MessageProcessor defines the methods needed by a queue reader implementation to process the messages it reads.
Click to show internal directories.
Click to hide internal directories.