Help us shape the future of Go! Take the 2026 Go Developer Survey

dispatch-jobs

command
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Command dispatch-jobs shows dispatch jobs declared on a use case's plan: one operation (IssueInvoice) saves an invoice and returns usecaseop.Save(...).Dispatch(...), so the invoice row, its event, two dispatch jobs and the audit row commit in ONE transaction, or none of them does.

The rows land in outbox_messages in the contract's order (framework write-path 7a): the event, the jobs (in the order the plan lists them), the audit row. The platform's outbox processor then sends the DISPATCH_JOB rows to POST /api/dispatch-jobs/batch, and the platform delivers each job to its target URL.

Run

FC_DATABASE_URL=postgres://localhost:5432/billing go run ./examples/dispatch-jobs

It issues one invoice and prints the outbox rows it wrote.

Jump to

Keyboard shortcuts

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