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.
Click to show internal directories.
Click to hide internal directories.