Class BlockingRetryConsumerBeanDefinitionRegistryPostProcessor

java.lang.Object
com.broadleafcommerce.common.messaging.retry.blocking.BlockingRetryConsumerBeanDefinitionRegistryPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.context.EnvironmentAware, org.springframework.core.Ordered

public class BlockingRetryConsumerBeanDefinitionRegistryPostProcessor extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.context.EnvironmentAware, org.springframework.core.Ordered
Setup bean definitions for Spring Cloud Stream functions for blocking consumption retry based on BlockingRetryProperties
  • Constructor Details

    • BlockingRetryConsumerBeanDefinitionRegistryPostProcessor

      public BlockingRetryConsumerBeanDefinitionRegistryPostProcessor()
  • Method Details

    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • postProcessBeanFactory

      public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • postProcessBeanDefinitionRegistry

      public void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanDefinitionRegistry in interface org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • constructErrorHandler

      protected org.springframework.beans.factory.support.RootBeanDefinition constructErrorHandler(String originalConsumerBinding)
      Establish the error handler bean definition responsible for navigating the retry lifecycle for the blocking case when using Spring retry.
      Parameters:
      originalConsumerBinding - The simple name of the original consumer binding
      Returns:
      The bean definition
    • constructRetryTemplate

      protected org.springframework.beans.factory.support.RootBeanDefinition constructRetryTemplate(BlockingFixedRetryInfo info)
      Create the bean definition informed by the Spring retry related config for the blocking case.
      Parameters:
      info - The blocking retry configuration
      Returns:
      The bean definition
    • determineBinderType

      protected String determineBinderType(String fullyQualifiedOriginalConsumerBinding)
      Determine the implementation type of the binder associated with a consumer binding
      Parameters:
      fullyQualifiedOriginalConsumerBinding - The fully qualified property name of the original consumer binding
      Returns:
      The binder type