Interface TransactionalOutboxConfiguration

All Known Implementing Classes:
TransactionalOutboxConfigurationProperties

public interface TransactionalOutboxConfiguration
  • Method Details

    • getPollDelay

      Duration getPollDelay()
      Time to wait until a next poll for new messages to send after the previous poll finished sending messages.
    • getContinuousRelayTimeout

      Duration getContinuousRelayTimeout()
      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.
    • getMessageRelayBatchSize

      int getMessageRelayBatchSize()
      Maximum number of messages to process in one message relay transaction.
    • getMessageSendImmediatelyTimeout

      Duration getMessageSendImmediatelyTimeout()
      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.
    • getMessageSendScheduledTimeout

      Duration getMessageSendScheduledTimeout()
      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.
    • getMessageSendImmediatelyMaxBlockTime

      Duration getMessageSendImmediatelyMaxBlockTime()
      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.
    • getMessageSendScheduledMaxBlockTime

      Duration getMessageSendScheduledMaxBlockTime()
      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.
    • getMaxDurationSendImmediately

      default Duration getMaxDurationSendImmediately()
      Expected maximum duration for sending a message when sending is immediately after the transaction commit.
    • getMaxDurationSendScheduled

      default Duration getMaxDurationSendScheduled()
      Expected maximum duration for sending a message when sending is scheduled during a poll.
    • isScheduledRelayEnabled

      boolean isScheduledRelayEnabled()
      Enable or disable the scheduled relaying of messages.
    • getHouseKeepingSchedule

      String getHouseKeepingSchedule()
      Cron expression to schedule the house keeping tasks.
    • getSentMessageRetentionDuration

      Duration getSentMessageRetentionDuration()
      Duration for which successfully sent messages are kept in the outbox before they get deleted by the house keeping.
    • getUnsentMessageRetentionDuration

      Duration getUnsentMessageRetentionDuration()
      Duration for which not yet successfully sent messages are kept in the outbox before they get deleted by the house keeping.
    • getMetricsUpdateInterval

      Duration getMetricsUpdateInterval()
      Interval between metrics updates.