Class OutboxBuilder

java.lang.Object
org.alfresco.event.outbox.OutboxBuilder

public final class OutboxBuilder extends Object
Creates an Outbox instance backed by the relational database. Created instance relays the events using the At Least Once Delivery semantic. It means that:
  • it will try to participate in the already running Transaction while storing events
  • an OutboxException will be thrown on storing event failure
  • events will be delivered in order - but might be retried
Implementation Note - Delivery Semantic:
For the performance reasons the events are processed in batches (default behaviour). It means that more than one event can be retried. In some corner cases all events in the batch might be retried. The events will be still delivered in order. If it's important to prevent this behaviour the OutboxConfig.getFetchLimit() can be used to set the batch size to 1.

Implementation Note - Concurrency:
Multiple Outbox instances can work together and still provide the same guarantees as if there were only one Outbox instance. It means that it can be used in a clustered environment.