Class EsbOutboxConfig

java.lang.Object
com.kingsrook.qqq.esb.model.EsbOutboxConfig
All Implemented Interfaces:
Serializable

public class EsbOutboxConfig extends Object implements Serializable
Settings for the transactional ESB outbox (EsbInstanceMetaData.withOutbox). Off by default. When enabled, record change events are written to the outbox table (defined by EsbOutboxTable.defineTable, created by the application's migrations) in the same backend transaction as the record write, and a relay on every node publishes them: in order per destination, with retries and backoff, at-least-once. See docs/esb/index.adoc.
See Also:
  • Constructor Details

    • EsbOutboxConfig

      public EsbOutboxConfig()
  • Method Details

    • getEnabled

      public Boolean getEnabled()
      Getter for enabled: whether record change events go through the outbox.
    • setEnabled

      public void setEnabled(Boolean enabled)
      Setter for enabled
    • withEnabled

      public EsbOutboxConfig withEnabled(Boolean enabled)
      Fluent setter for enabled
    • getTableName

      public String getTableName()
      Getter for tableName: the QQQ name of the outbox table (default esb_outbox).
    • setTableName

      public void setTableName(String tableName)
      Setter for tableName
    • withTableName

      public EsbOutboxConfig withTableName(String tableName)
      Fluent setter for tableName
    • getBatchSize

      public Integer getBatchSize()
      Getter for batchSize: the most rows the relay sends, per destination, in one broker transaction.
    • setBatchSize

      public void setBatchSize(Integer batchSize)
      Setter for batchSize
    • withBatchSize

      public EsbOutboxConfig withBatchSize(Integer batchSize)
      Fluent setter for batchSize
    • getPollIntervalMs

      public Integer getPollIntervalMs()
      Getter for pollIntervalMs: how long the relay waits between passes when idle (a commit that writes outbox rows wakes it sooner on this node).
    • setPollIntervalMs

      public void setPollIntervalMs(Integer pollIntervalMs)
      Setter for pollIntervalMs
    • withPollIntervalMs

      public EsbOutboxConfig withPollIntervalMs(Integer pollIntervalMs)
      Fluent setter for pollIntervalMs
    • getLeaseMs

      public Integer getLeaseMs()
      Getter for leaseMs: how long a relay's claim on a destination's rows lasts; another node may take them over after it expires.
    • setLeaseMs

      public void setLeaseMs(Integer leaseMs)
      Setter for leaseMs
    • withLeaseMs

      public EsbOutboxConfig withLeaseMs(Integer leaseMs)
      Fluent setter for leaseMs
    • getMaxAttempts

      public Integer getMaxAttempts()
      Getter for maxAttempts: how many failed sends (while the broker is connected) before a row is DEAD. Sends that fail because the broker is unreachable do not count.
    • setMaxAttempts

      public void setMaxAttempts(Integer maxAttempts)
      Setter for maxAttempts
    • withMaxAttempts

      public EsbOutboxConfig withMaxAttempts(Integer maxAttempts)
      Fluent setter for maxAttempts
    • getInitialBackoffMs

      public Integer getInitialBackoffMs()
      Getter for initialBackoffMs: the wait after a row's first failed send; it doubles with each further failure.
    • setInitialBackoffMs

      public void setInitialBackoffMs(Integer initialBackoffMs)
      Setter for initialBackoffMs
    • withInitialBackoffMs

      public EsbOutboxConfig withInitialBackoffMs(Integer initialBackoffMs)
      Fluent setter for initialBackoffMs
    • getMaxBackoffMs

      public Integer getMaxBackoffMs()
      Getter for maxBackoffMs: the longest wait between a row's sends.
    • setMaxBackoffMs

      public void setMaxBackoffMs(Integer maxBackoffMs)
      Setter for maxBackoffMs
    • withMaxBackoffMs

      public EsbOutboxConfig withMaxBackoffMs(Integer maxBackoffMs)
      Fluent setter for maxBackoffMs
    • getRetentionDays

      public Integer getRetentionDays()
      Getter for retentionDays: how many days SENT rows are kept before the relay purges them (DEAD rows are kept until someone deletes them).
    • setRetentionDays

      public void setRetentionDays(Integer retentionDays)
      Setter for retentionDays
    • withRetentionDays

      public EsbOutboxConfig withRetentionDays(Integer retentionDays)
      Fluent setter for retentionDays
    • getPurgeIntervalMs

      public Integer getPurgeIntervalMs()
      Getter for purgeIntervalMs: how often each node purges old SENT rows.
    • setPurgeIntervalMs

      public void setPurgeIntervalMs(Integer purgeIntervalMs)
      Setter for purgeIntervalMs
    • withPurgeIntervalMs

      public EsbOutboxConfig withPurgeIntervalMs(Integer purgeIntervalMs)
      Fluent setter for purgeIntervalMs
    • getPendingAlertMs

      public Integer getPendingAlertMs()
      Getter for pendingAlertMs: the health check degrades when the oldest PENDING row is older than this.
    • setPendingAlertMs

      public void setPendingAlertMs(Integer pendingAlertMs)
      Setter for pendingAlertMs
    • withPendingAlertMs

      public EsbOutboxConfig withPendingAlertMs(Integer pendingAlertMs)
      Fluent setter for pendingAlertMs