outbox

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package outbox implements the Transactional Outbox pattern: outbound messages are stored in the caller's DB transaction and a relay ships them to NATS asynchronously.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message interface {
	Subject() string
	Version() string
}

Message is the constraint for any outbound message the outbox can ship — an integration event or a queue task alike. Both are addressed by Subject and carry a schema Version; the stored payload is the value's own JSON. The outbox is deliberately blind to which kind it is: the event-vs-task distinction lives in the subject namespace, not here.

type Outbox

type Outbox interface {
	Store(ctx context.Context, m Message) error
}

Outbox stores outbound messages for at-least-once delivery to the central message bus.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL