Class TransactionalOutboxConfigurationProperties

java.lang.Object
ch.admin.bit.jeap.messaging.transactionaloutbox.config.TransactionalOutboxConfigurationProperties
All Implemented Interfaces:
TransactionalOutboxConfiguration

@AutoConfiguration("txOutboxConfigProps") @ConfigurationProperties(prefix="jeap.messaging.transactional-outbox") public class TransactionalOutboxConfigurationProperties extends Object implements TransactionalOutboxConfiguration
  • Field Details

    • pollDelay

      public Duration pollDelay
    • continuousRelayTimeout

      public Duration continuousRelayTimeout
    • messageRelayBatchSize

      public int messageRelayBatchSize
    • messageSendImmediatelyTimeout

      public Duration messageSendImmediatelyTimeout
    • messageSendImmediatelyMaxBlockTime

      public Duration messageSendImmediatelyMaxBlockTime
    • messageSendScheduledTimeout

      public Duration messageSendScheduledTimeout
    • messageSendScheduledMaxBlockTime

      public Duration messageSendScheduledMaxBlockTime
    • scheduledRelayEnabled

      public boolean scheduledRelayEnabled
    • houseKeepingSchedule

      public String houseKeepingSchedule
    • sentMessageRetentionDuration

      public Duration sentMessageRetentionDuration
    • unsentMessageRetentionDuration

      public Duration unsentMessageRetentionDuration
    • metricsUpdateInterval

      public Duration metricsUpdateInterval
  • Constructor Details

    • TransactionalOutboxConfigurationProperties

      public TransactionalOutboxConfigurationProperties()
  • Method Details

    • getPollDelay

      public Duration getPollDelay()
      Description copied from interface: TransactionalOutboxConfiguration
      Time to wait until a next poll for new messages to send after the previous poll finished sending messages.
      Specified by:
      getPollDelay in interface TransactionalOutboxConfiguration
    • getContinuousRelayTimeout

      public Duration getContinuousRelayTimeout()
      Description copied from interface: TransactionalOutboxConfiguration
      Maximum duration of continuously relaying message batches in a poll. If there are a lot of unsent messages in the outbox (e.g. because Kafka is unreachable) it could take a long time of continuous sending to clear the outbox. This could pose a problem for the scheduling of the relay tasks. Shedlock e.g. defines a maximum lock lifespan. If clearing the outbox would take longer than this lifespan the lock would be revoked by Shedlock which could result in more than one relay tasks running in parallel. To prevent this the relay tasks should only continuously relay messages for a shorter timespan than the maximum lock lifespan. The ContinuousRelayTimeout configuration tells the relay tasks after what time span they should stop sending messages and wait to be started again later according to the configured scheduling poll interval.
      Specified by:
      getContinuousRelayTimeout in interface TransactionalOutboxConfiguration
    • getMessageRelayBatchSize

      public int getMessageRelayBatchSize()
      Description copied from interface: TransactionalOutboxConfiguration
      Maximum number of messages to process in one message relay transaction.
      Specified by:
      getMessageRelayBatchSize in interface TransactionalOutboxConfiguration
    • getMessageSendImmediatelyTimeout

      public Duration getMessageSendImmediatelyTimeout()
      Description copied from interface: TransactionalOutboxConfiguration
      Maximum duration to wait on Kafka to finish sending a message when sending is immediately after the transaction commit. This timeout should not be too big in order to not delay the thread that put the messages into the outbox too much for cases when Kafka is unavailable or very slow.
      Specified by:
      getMessageSendImmediatelyTimeout in interface TransactionalOutboxConfiguration
    • getMessageSendImmediatelyMaxBlockTime

      public Duration getMessageSendImmediatelyMaxBlockTime()
      Description copied from interface: TransactionalOutboxConfiguration
      Maximum duration to wait on Kafka to start sending a message when sending is immediately after the transaction commit. This timeout should be rather small in order to not unnecessarily delay the thread that put the messages into the outbox for cases when Kafka is unavailable or very slow.
      Specified by:
      getMessageSendImmediatelyMaxBlockTime in interface TransactionalOutboxConfiguration
    • getMessageSendScheduledTimeout

      public Duration getMessageSendScheduledTimeout()
      Description copied from interface: TransactionalOutboxConfiguration
      Maximum duration to wait on Kafka to finish sending a message when sending is scheduled during a poll. This timeout should be sufficiently large in order to allow the outbox to still successfully relay messages even when Kafka would be slow in accepting messages.
      Specified by:
      getMessageSendScheduledTimeout in interface TransactionalOutboxConfiguration
    • getMessageSendScheduledMaxBlockTime

      public Duration getMessageSendScheduledMaxBlockTime()
      Description copied from interface: TransactionalOutboxConfiguration
      Maximum duration to wait on Kafka to start sending a message when sending is scheduled during a poll. This timeout should be sufficiently large in order to allow the outbox to still successfully relay messages even when Kafka would be slow in accepting messages.
      Specified by:
      getMessageSendScheduledMaxBlockTime in interface TransactionalOutboxConfiguration
    • isScheduledRelayEnabled

      public boolean isScheduledRelayEnabled()
      Description copied from interface: TransactionalOutboxConfiguration
      Enable or disable the scheduled relaying of messages.
      Specified by:
      isScheduledRelayEnabled in interface TransactionalOutboxConfiguration
    • getHouseKeepingSchedule

      public String getHouseKeepingSchedule()
      Description copied from interface: TransactionalOutboxConfiguration
      Cron expression to schedule the house keeping tasks.
      Specified by:
      getHouseKeepingSchedule in interface TransactionalOutboxConfiguration
    • getSentMessageRetentionDuration

      public Duration getSentMessageRetentionDuration()
      Description copied from interface: TransactionalOutboxConfiguration
      Duration for which successfully sent messages are kept in the outbox before they get deleted by the house keeping.
      Specified by:
      getSentMessageRetentionDuration in interface TransactionalOutboxConfiguration
    • getUnsentMessageRetentionDuration

      public Duration getUnsentMessageRetentionDuration()
      Description copied from interface: TransactionalOutboxConfiguration
      Duration for which not yet successfully sent messages are kept in the outbox before they get deleted by the house keeping.
      Specified by:
      getUnsentMessageRetentionDuration in interface TransactionalOutboxConfiguration
    • getMetricsUpdateInterval

      public Duration getMetricsUpdateInterval()
      Description copied from interface: TransactionalOutboxConfiguration
      Interval between metrics updates.
      Specified by:
      getMetricsUpdateInterval in interface TransactionalOutboxConfiguration
    • setPollDelay

      public void setPollDelay(Duration pollDelay)
    • setContinuousRelayTimeout

      public void setContinuousRelayTimeout(Duration continuousRelayTimeout)
    • setMessageRelayBatchSize

      public void setMessageRelayBatchSize(int messageRelayBatchSize)
    • setMessageSendImmediatelyTimeout

      public void setMessageSendImmediatelyTimeout(Duration messageSendImmediatelyTimeout)
    • setMessageSendImmediatelyMaxBlockTime

      public void setMessageSendImmediatelyMaxBlockTime(Duration messageSendImmediatelyMaxBlockTime)
    • setMessageSendScheduledTimeout

      public void setMessageSendScheduledTimeout(Duration messageSendScheduledTimeout)
    • setMessageSendScheduledMaxBlockTime

      public void setMessageSendScheduledMaxBlockTime(Duration messageSendScheduledMaxBlockTime)
    • setScheduledRelayEnabled

      public void setScheduledRelayEnabled(boolean scheduledRelayEnabled)
    • setHouseKeepingSchedule

      public void setHouseKeepingSchedule(String houseKeepingSchedule)
    • setSentMessageRetentionDuration

      public void setSentMessageRetentionDuration(Duration sentMessageRetentionDuration)
    • setUnsentMessageRetentionDuration

      public void setUnsentMessageRetentionDuration(Duration unsentMessageRetentionDuration)
    • setMetricsUpdateInterval

      public void setMetricsUpdateInterval(Duration metricsUpdateInterval)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object