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 Summary
FieldsModifier and TypeFieldDescriptionintboolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMaximum duration of continuously relaying message batches in a poll.Cron expression to schedule the house keeping tasks.intMaximum number of messages to process in one message relay transaction.Maximum duration to wait on Kafka to start sending a message when sending is immediately after the transaction commit.Maximum duration to wait on Kafka to finish sending a message when sending is immediately after the transaction commit.Maximum duration to wait on Kafka to start sending a message when sending is scheduled during a poll.Maximum duration to wait on Kafka to finish sending a message when sending is scheduled during a poll.Interval between metrics updates.Time to wait until a next poll for new messages to send after the previous poll finished sending messages.Duration for which successfully sent messages are kept in the outbox before they get deleted by the house keeping.Duration for which not yet successfully sent messages are kept in the outbox before they get deleted by the house keeping.inthashCode()booleanEnable or disable the scheduled relaying of messages.voidsetContinuousRelayTimeout(Duration continuousRelayTimeout) voidsetHouseKeepingSchedule(String houseKeepingSchedule) voidsetMessageRelayBatchSize(int messageRelayBatchSize) voidsetMessageSendImmediatelyMaxBlockTime(Duration messageSendImmediatelyMaxBlockTime) voidsetMessageSendImmediatelyTimeout(Duration messageSendImmediatelyTimeout) voidsetMessageSendScheduledMaxBlockTime(Duration messageSendScheduledMaxBlockTime) voidsetMessageSendScheduledTimeout(Duration messageSendScheduledTimeout) voidsetMetricsUpdateInterval(Duration metricsUpdateInterval) voidsetPollDelay(Duration pollDelay) voidsetScheduledRelayEnabled(boolean scheduledRelayEnabled) voidsetSentMessageRetentionDuration(Duration sentMessageRetentionDuration) voidsetUnsentMessageRetentionDuration(Duration unsentMessageRetentionDuration) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.admin.bit.jeap.messaging.transactionaloutbox.outbox.TransactionalOutboxConfiguration
getMaxDurationSendImmediately, getMaxDurationSendScheduled
-
Field Details
-
pollDelay
-
continuousRelayTimeout
-
messageRelayBatchSize
public int messageRelayBatchSize -
messageSendImmediatelyTimeout
-
messageSendImmediatelyMaxBlockTime
-
messageSendScheduledTimeout
-
messageSendScheduledMaxBlockTime
-
scheduledRelayEnabled
public boolean scheduledRelayEnabled -
houseKeepingSchedule
-
sentMessageRetentionDuration
-
unsentMessageRetentionDuration
-
metricsUpdateInterval
-
-
Constructor Details
-
TransactionalOutboxConfigurationProperties
public TransactionalOutboxConfigurationProperties()
-
-
Method Details
-
getPollDelay
Description copied from interface:TransactionalOutboxConfigurationTime to wait until a next poll for new messages to send after the previous poll finished sending messages.- Specified by:
getPollDelayin interfaceTransactionalOutboxConfiguration
-
getContinuousRelayTimeout
Description copied from interface:TransactionalOutboxConfigurationMaximum 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:
getContinuousRelayTimeoutin interfaceTransactionalOutboxConfiguration
-
getMessageRelayBatchSize
public int getMessageRelayBatchSize()Description copied from interface:TransactionalOutboxConfigurationMaximum number of messages to process in one message relay transaction.- Specified by:
getMessageRelayBatchSizein interfaceTransactionalOutboxConfiguration
-
getMessageSendImmediatelyTimeout
Description copied from interface:TransactionalOutboxConfigurationMaximum 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:
getMessageSendImmediatelyTimeoutin interfaceTransactionalOutboxConfiguration
-
getMessageSendImmediatelyMaxBlockTime
Description copied from interface:TransactionalOutboxConfigurationMaximum 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:
getMessageSendImmediatelyMaxBlockTimein interfaceTransactionalOutboxConfiguration
-
getMessageSendScheduledTimeout
Description copied from interface:TransactionalOutboxConfigurationMaximum 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:
getMessageSendScheduledTimeoutin interfaceTransactionalOutboxConfiguration
-
getMessageSendScheduledMaxBlockTime
Description copied from interface:TransactionalOutboxConfigurationMaximum 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:
getMessageSendScheduledMaxBlockTimein interfaceTransactionalOutboxConfiguration
-
isScheduledRelayEnabled
public boolean isScheduledRelayEnabled()Description copied from interface:TransactionalOutboxConfigurationEnable or disable the scheduled relaying of messages.- Specified by:
isScheduledRelayEnabledin interfaceTransactionalOutboxConfiguration
-
getHouseKeepingSchedule
Description copied from interface:TransactionalOutboxConfigurationCron expression to schedule the house keeping tasks.- Specified by:
getHouseKeepingSchedulein interfaceTransactionalOutboxConfiguration
-
getSentMessageRetentionDuration
Description copied from interface:TransactionalOutboxConfigurationDuration for which successfully sent messages are kept in the outbox before they get deleted by the house keeping.- Specified by:
getSentMessageRetentionDurationin interfaceTransactionalOutboxConfiguration
-
getUnsentMessageRetentionDuration
Description copied from interface:TransactionalOutboxConfigurationDuration for which not yet successfully sent messages are kept in the outbox before they get deleted by the house keeping.- Specified by:
getUnsentMessageRetentionDurationin interfaceTransactionalOutboxConfiguration
-
getMetricsUpdateInterval
Description copied from interface:TransactionalOutboxConfigurationInterval between metrics updates.- Specified by:
getMetricsUpdateIntervalin interfaceTransactionalOutboxConfiguration
-
setPollDelay
-
setContinuousRelayTimeout
-
setMessageRelayBatchSize
public void setMessageRelayBatchSize(int messageRelayBatchSize) -
setMessageSendImmediatelyTimeout
-
setMessageSendImmediatelyMaxBlockTime
-
setMessageSendScheduledTimeout
-
setMessageSendScheduledMaxBlockTime
-
setScheduledRelayEnabled
public void setScheduledRelayEnabled(boolean scheduledRelayEnabled) -
setHouseKeepingSchedule
-
setSentMessageRetentionDuration
-
setUnsentMessageRetentionDuration
-
setMetricsUpdateInterval
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-