Documentation
¶
Overview ¶
Package memory is an in-process queue backend. It is intended for tests and single-process applications that need queue semantics without persistent infrastructure.
Delivery semantics: at-least-once (a handler that panics or returns an error causes redelivery). Ordering: FIFO per topic. Concurrency: competing consumers on the same topic split the message stream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// MaxRetries caps redelivery attempts before a message is dropped.
// Zero means unlimited (retry forever). Callers that need dead-letter
// routing should use the hex/queue/jobs layer.
MaxRetries int
// RetryDelay is the wait between redeliveries of the same message.
// Zero means immediate.
RetryDelay time.Duration
// PollInterval controls how often the background scheduler looks for
// due delayed messages. Defaults to 50ms.
PollInterval time.Duration
}
Options configures a memory Queue.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is an in-memory queue.Queue implementation.
func (*Queue) PendingCount ¶
PendingCount returns the number of ready messages across all topics. Useful for tests; not part of the queue.Queue interface.
Click to show internal directories.
Click to hide internal directories.