Releases: oagudo/outbox
v1.0.1
v1.0.0
Release v1.0.0
🚨 Breaking Changes
Writer.Write() Method Signature Changed
The Write() method signature has been completely redesigned to support conditional and multiple message publishing.
Migration: Replace writer.Write(ctx, msg, fn) with writer.WriteOne(ctx, msg, fn)
Motivation: Use shorter function name Write for version that enables storing multiple messages or conditionally emitting messages based on business logic within a single transaction.
TxQueryer Interface Extended
The TxQueryer interface now requires QueryRowContext() method.
Migration: Add QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row to custom TxQueryer implementations.
Motivation: Enables querying single rows within transactions, a common use case that was previously unsupported.
Error Message Format Changed
Error message strings simplified from "failed to X" to "X" format.
Migration: Update code that parses or matches error message strings (affects PublishError, UpdateError, DeleteError, ReadError).
Motivation: More idiomatic Go error messages.
New Features
- Conditional and multiple message publishing via new
Write()method - Custom table names via
WithTableName()option - Improved optimistic publishing with batch deletion
- Immediate message processing on
Reader.Start()