java.lang.Object
com.broadleafcommerce.common.messaging.notification.RetryProperties

public class RetryProperties extends Object
Configuration for a RetryHandler
Author:
Jeff Fischer
  • Constructor Summary

    Constructors
    Constructor
    Description
    RetryProperties(String retryClusterServiceNamespace)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    The amount of time after initialization of the application that must pass before the retry scheduler starts.
    The amount of time that must elapse before the retry mechanism can kick in on a newly altered and unacknowledged record.
    int
    The maximum number of failed attempts that should be made before ceasing to attempt to send a message for an unacknowledged record.
    The maximum amount of time that should elapse before making another attempt on an unacknowledged record.
    int
    The number of valid, unacknowledged records to batch process per interval.
    The amount of time to pause between the processing of each unacknowledged record in the batch.
    Name used to identify the cluster singleton lock
    The length of time to wait between each batch retry attempt.
    int
     
    boolean
    Deprecated.
    Development state is now handled through the broadleaf.messaging.cluster-service-implementation-type property.
    void
    setDelayAtStartup(Duration delayAtStartup)
    The amount of time after initialization of the application that must pass before the retry scheduler starts.
    void
    setDeveloperMode(boolean developerMode)
    Deprecated.
    Development state is now handled through the broadleaf.messaging.cluster-service-implementation-type property.
    void
    setInitialFaultThreshold(Duration initialFaultThreshold)
    The amount of time that must elapse before the retry mechanism can kick in on a newly altered and unacknowledged record.
    void
    setMaxAttempts(int maxAttempts)
    The maximum number of failed attempts that should be made before ceasing to attempt to send a message for an unacknowledged record.
    void
    setMaxAttemptWaitTime(Duration maxAttemptWaitTime)
    The maximum amount of time that should elapse before making another attempt on an unacknowledged record.
    void
    setPageSize(int pageSize)
    The number of valid, unacknowledged records to batch process per interval.
    void
    setRecordProcessingWait(Duration recordProcessingWait)
    The amount of time to pause between the processing of each unacknowledged record in the batch.
    void
    setRetryClusterServiceNamespace(String retryClusterServiceNamespace)
    Name used to identify the cluster singleton lock
    void
    setRetryInterval(Duration retryInterval)
    The length of time to wait between each batch retry attempt.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RetryProperties

      public RetryProperties(String retryClusterServiceNamespace)
  • Method Details

    • getRetryClusterServiceNamespace

      public String getRetryClusterServiceNamespace()
      Name used to identify the cluster singleton lock
    • isDeveloperMode

      @Deprecated public boolean isDeveloperMode()
      Deprecated.
      Development state is now handled through the broadleaf.messaging.cluster-service-implementation-type property. The default for that property is file, which is appropriate for local development.
      Indicates the retry system is intended in this configuration to be used by developers, rather than a real deployment. This setting causes an additional random piece of information to be appended to retryClusterServiceNamespace so that instances of the same service being run by multiple devs on the same subnet are not interpreted as being part of the same cluster. Otherwise, retry behavior could be unpredictable between machines and retry services might not start up locally for one or more devs. The default is true.
    • getRetryInterval

      public Duration getRetryInterval()
      The length of time to wait between each batch retry attempt. The default is 5 minutes.
    • getPageSize

      public int getPageSize()
      The number of valid, unacknowledged records to batch process per interval. The default is 1000.
    • getMaxAttempts

      public int getMaxAttempts()
      The maximum number of failed attempts that should be made before ceasing to attempt to send a message for an unacknowledged record. The default is 10.
    • getMaxAttemptWaitTime

      public Duration getMaxAttemptWaitTime()
      The maximum amount of time that should elapse before making another attempt on an unacknowledged record. The time between retries for an individual record is generally governed by a exponential backoff algorithm, but this value represents a ceiling beyond which that algorithm may not exceed. The default is 4 hours.
    • getInitialFaultThreshold

      public Duration getInitialFaultThreshold()
      The amount of time that must elapse before the retry mechanism can kick in on a newly altered and unacknowledged record. This provides a safe window in which the normal operation can acknowledge the record without risk of interference from the retry handler. The default is 5 minutes.
    • getRecordProcessingWait

      public Duration getRecordProcessingWait()
      The amount of time to pause between the processing of each unacknowledged record in the batch. This is primarily a throttling measure. The default value is 0 (don't throttle).
    • getDelayAtStartup

      public Duration getDelayAtStartup()
      The amount of time after initialization of the application that must pass before the retry scheduler starts. Can be used to provide some buffer of time for other components (e.g. kafka bindings) to fully initialize. The default is 0 seconds.
    • setRetryClusterServiceNamespace

      public void setRetryClusterServiceNamespace(String retryClusterServiceNamespace)
      Name used to identify the cluster singleton lock
    • setDeveloperMode

      @Deprecated public void setDeveloperMode(boolean developerMode)
      Deprecated.
      Development state is now handled through the broadleaf.messaging.cluster-service-implementation-type property. The default for that property is file, which is appropriate for local development.
      Indicates the retry system is intended in this configuration to be used by developers, rather than a real deployment. This setting causes an additional random piece of information to be appended to retryClusterServiceNamespace so that instances of the same service being run by multiple devs on the same subnet are not interpreted as being part of the same cluster. Otherwise, retry behavior could be unpredictable between machines and retry services might not start up locally for one or more devs. The default is true.
    • setRetryInterval

      public void setRetryInterval(Duration retryInterval)
      The length of time to wait between each batch retry attempt. The default is 5 minutes.
    • setPageSize

      public void setPageSize(int pageSize)
      The number of valid, unacknowledged records to batch process per interval. The default is 1000.
    • setMaxAttempts

      public void setMaxAttempts(int maxAttempts)
      The maximum number of failed attempts that should be made before ceasing to attempt to send a message for an unacknowledged record. The default is 10.
    • setMaxAttemptWaitTime

      public void setMaxAttemptWaitTime(Duration maxAttemptWaitTime)
      The maximum amount of time that should elapse before making another attempt on an unacknowledged record. The time between retries for an individual record is generally governed by a exponential backoff algorithm, but this value represents a ceiling beyond which that algorithm may not exceed. The default is 4 hours.
    • setInitialFaultThreshold

      public void setInitialFaultThreshold(Duration initialFaultThreshold)
      The amount of time that must elapse before the retry mechanism can kick in on a newly altered and unacknowledged record. This provides a safe window in which the normal operation can acknowledge the record without risk of interference from the retry handler. The default is 5 minutes.
    • setRecordProcessingWait

      public void setRecordProcessingWait(Duration recordProcessingWait)
      The amount of time to pause between the processing of each unacknowledged record in the batch. This is primarily a throttling measure. The default value is 0 (don't throttle).
    • setDelayAtStartup

      public void setDelayAtStartup(Duration delayAtStartup)
      The amount of time after initialization of the application that must pass before the retry scheduler starts. Can be used to provide some buffer of time for other components (e.g. kafka bindings) to fully initialize. The default is 0 seconds.
    • 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