Documentation
¶
Overview ¶
Package queue defines the platform work-queue contract and its outbox-backed implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Module provides the outbox-backed queue as the Queue contract.
Functions ¶
This section is empty.
Types ¶
type OutboxQueue ¶
type OutboxQueue struct {
// contains filtered or unexported fields
}
OutboxQueue implements Queue by reusing the outbox publisher: a Task has the same Subject()/Version() shape as an OutboxEvent, so the outbox row layout already fits. The relay routes by subject (events.* vs queue.*) to the appropriate JetStream stream.
func NewOutboxQueue ¶
func NewOutboxQueue(publisher outbox.Outbox) *OutboxQueue
func (*OutboxQueue) Enqueue ¶
func (q *OutboxQueue) Enqueue(ctx context.Context, t Task) error
Enqueue stages a task for at-least-once, single-consumer execution. MUST be called inside a UnitOfWork transaction so the outbox row write is atomic with the aggregate state change that triggered the enqueue.
Click to show internal directories.
Click to hide internal directories.