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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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