Module: AceMQ::AMQP::Patterns::OutboxStore

Defined in:
lib/acemq/amqp/patterns/outbox.rb

Overview

Holds messages that have been decided but not yet published.

A store is anything answering three methods:

add(record)          # record a message to be published
pending(limit)       # the records waiting, oldest first
mark_published(id)   # remove one the broker has confirmed

An implementation is only worth having if add can join the caller's transaction. A store that opens its own connection has the gap back, and has it in a place that looks like it has been dealt with — which is worse than not having the pattern at all.