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 Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected StringdetermineBinderType(String fullyQualifiedOriginalConsumerBinding, org.springframework.core.env.ConfigurableEnvironment environment) Determine the implementation type of the binder associated with a consumer bindingvoidpostProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application) protected voidsetupAckDeadline(BlockingRetryProperties blockingRetryProperties, org.springframework.core.env.ConfigurableEnvironment environment, Map<String, Object> propertySource) Set up thespring.cloud.gcp.pubsub.subscriber.max-ack-extension-periodproperty based onBlockingRetryProperties.PubSub.getMaxAckExtensionPeriod()value, if not already defined.protected voidsetupDlq(String dlq, org.springframework.core.env.ConfigurableEnvironment environment, Map<String, Object> propertySource) Establish the producer binding property for DLQ, if not already defined.protected voidsetupErrorHandler(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. 
- 
Constructor Details
- 
BlockingRetryEnvironmentPostProcessor
public BlockingRetryEnvironmentPostProcessor() 
 - 
 - 
Method Details
- 
postProcessEnvironment
public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, org.springframework.boot.SpringApplication application) - Specified by:
 postProcessEnvironmentin interfaceorg.springframework.boot.env.EnvironmentPostProcessor
 - 
setupAckDeadline
protected void setupAckDeadline(BlockingRetryProperties blockingRetryProperties, org.springframework.core.env.ConfigurableEnvironment environment, Map<String, Object> propertySource) Set up thespring.cloud.gcp.pubsub.subscriber.max-ack-extension-periodproperty based onBlockingRetryProperties.PubSub.getMaxAckExtensionPeriod()value, if not already defined. Only relevant to pubsub bindings - harmless otherwise.- Parameters:
 blockingRetryProperties- The blocking retry configurationenvironment- The spring environmentpropertySource- 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 isspring.cloud.stream.bindings.[dlq]Output.destination.- Parameters:
 dlq- The simple root name for the dlq bindingenvironment- The spring environmentpropertySource- 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 whenBlockingFixedRetryInfo.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 bindingconsumerBinding- The simple name of the original consumer binding (not fully qualified)environment- The spring environmentpropertySource- 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 bindingenvironment- The spring environment- Returns:
 - The binder type
 
 
 -