Class EsbOutbox
java.lang.Object
com.kingsrook.qqq.esb.outbox.EsbOutbox
Writes events to the ESB outbox table (see EsbOutboxConfig and
EsbOutboxRelay).
Where the rows are written depends on the record write's transaction:
- a transaction on the outbox table's backend: in that transaction, so the
rows commit (or roll back) with the records;
- a transaction on another backend: right after it commits (never if it
rolls back) - not atomic with the records, so put the outbox on the
publishing tables' backend;
- no transaction (the records are already stored): right away.
Rows are inserted as the system user, without record change events. Each
commit (or immediate write) wakes this node's relay.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EsbOutboxConfiggetEnabledConfig(QInstance qInstance) The instance's outbox settings, if the outbox is enabled - else null.static voidwrite(String recordTableName, QBackendTransaction transaction, Map<String, List<EsbEvent>> eventsByDestination) Write the events (by destination, in order) for a write to recordTableName (see the class comment for when).
-
Method Details
-
getEnabledConfig
The instance's outbox settings, if the outbox is enabled - else null. -
write
public static void write(String recordTableName, QBackendTransaction transaction, Map<String, List<EsbEvent>> eventsByDestination) throws QExceptionWrite the events (by destination, in order) for a write to recordTableName (see the class comment for when). Throws if a write made now fails - in a transaction, the caller must then roll back.- Throws:
QException
-