Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MsqConsumer ¶
type MsqConsumer interface { Close() error // Read the next queue message Read(limit int, timeout time.Duration) ([]redis.StreamEntry, error) // Confirm and delete the queue message ACK(msgEntryId string) error // Put the message to the delay queue Delay(msgEntry *redis.MessageEntry) error // Read the queue msg, and send to the handleFn // if the handle function return true, auto send a ack to done the entry; // if the handle function return false, auto send the entry to a delay queue; // it will block the thread to wait the entry; // if a error happend, the caller need recall the Next function. Next(handleFn MsqConsumerHandleFunc) error }
https://redis.io/docs/data-types/streams/ https://redis.io/commands/xclaim/
type MsqConsumerHandleFunc ¶
type MsqConsumerHandleFunc func(*redis.MessageEntry) bool
type MsqProducer ¶
func NewMsqProducer ¶
func NewMsqProducer(rs *redis.RediStore, streamName string) MsqProducer
Click to show internal directories.
Click to hide internal directories.