Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fanout ¶
type Fanout []Publisher
Fanout attempts every publisher. The outbox completes a message only when all publishers succeed. A partial failure retries delivery to every publisher. ponytail: use per-broker outbox state if independent retries become necessary.
type Outbox ¶
type Outbox interface {
ProcessOutboxBatch(ctx context.Context, publish func([]OutboxMessage) []OutboxMessagePublishResult) error
}
Outbox reserves messages while publish runs and marks only acknowledged messages as processed. ProcessOutboxBatch reports storage failures. publish must return one result per input message, containing that original message.
type OutboxMessage ¶
type OutboxMessagePublishResult ¶
type OutboxMessagePublishResult struct {
OutboxMessage
Err error
}
OutboxMessagePublishResult contains the original message and its publication error. OutboxMessage must be non-nil. A nil Err means the publisher acknowledged the message, independently of whether the outbox record was successfully marked as processed.