Class BlockingRetryEnvironmentPostProcessor

java.lang.Object
com.broadleafcommerce.common.messaging.retry.blocking.BlockingRetryEnvironmentPostProcessor
All Implemented Interfaces:
org.springframework.boot.env.EnvironmentPostProcessor

public class BlockingRetryEnvironmentPostProcessor extends Object implements org.springframework.boot.env.EnvironmentPostProcessor
Setup environment based on BlockingRetryProperties
  • Constructor Details

    • BlockingRetryEnvironmentPostProcessor

      public BlockingRetryEnvironmentPostProcessor()
  • Method Details

    • postProcessEnvironment

      public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application)
      Specified by:
      postProcessEnvironment in interface org.springframework.boot.env.EnvironmentPostProcessor
    • setupAckDeadline

      protected void setupAckDeadline(BlockingRetryProperties blockingRetryProperties, org.springframework.core.env.ConfigurableEnvironment environment, Map<String,Object> propertySource)
      Set up the spring.cloud.gcp.pubsub.subscriber.max-ack-extension-period property based on BlockingRetryProperties.PubSub.getMaxAckExtensionPeriod() value, if not already defined. Only relevant to pubsub bindings - harmless otherwise.
      Parameters:
      blockingRetryProperties - The blocking retry configuration
      environment - The spring environment
      propertySource - The property source that will be contributed to the spring environment
    • setupDlq

      protected void setupDlq(String dlq, org.springframework.core.env.ConfigurableEnvironment environment, Map<String,Object> propertySource)
      Establish the producer binding property for DLQ, if not already defined. The pattern for the property is spring.cloud.stream.bindings.[dlq]Output.destination.
      Parameters:
      dlq - The simple root name for the dlq binding
      environment - The spring environment
      propertySource - The property source that will be contributed to the spring environment
    • setupErrorHandler

      protected void setupErrorHandler(String fullyQualifiedOriginalConsumerBinding, String consumerBinding, org.springframework.core.env.ConfigurableEnvironment environment, Map<String,Object> propertySource)
      Establish the error handler definition property for the original consumer binding. This only applies for either non-kafka binders, or kafka when BlockingFixedRetryInfo.Kafka.isSeekToCurrentRecordOnFailure() is false. This is the error handler executed after in-memory Spring retry attempts have been exhausted.
      Parameters:
      fullyQualifiedOriginalConsumerBinding - The fully qualified property name of the original consumer binding
      consumerBinding - The simple name of the original consumer binding (not fully qualified)
      environment - The spring environment
      propertySource - The property source that will be contributed to the spring environment
      See Also:
    • determineBinderType

      protected String determineBinderType(String fullyQualifiedOriginalConsumerBinding, org.springframework.core.env.ConfigurableEnvironment environment)
      Determine the implementation type of the binder associated with a consumer binding
      Parameters:
      fullyQualifiedOriginalConsumerBinding - The fully qualified property name of the original consumer binding
      environment - The spring environment
      Returns:
      The binder type