Class NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor

java.lang.Object
com.broadleafcommerce.common.messaging.retry.nonblocking.NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor
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 NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor 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 non-blocking consumption retry
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.beans.factory.support.RootBeanDefinition
    buildErrorHandler(String originalConsumerBinding, NonBlockingFixedRetryInfo retryInfo)
    Establish the error handler bean definition responsible for navigating the retry lifecycle for the non-blocking case.
    protected org.springframework.beans.factory.support.RootBeanDefinition
    Set up the Kafka specific bean definition for the retry consumer for the non-blocking case.
    protected org.springframework.beans.factory.support.RootBeanDefinition
    Set up the PubSub specific bean definition for the retry consumer for the non-blocking case.
    protected org.springframework.beans.factory.support.RootBeanDefinition
    buildRetryConsumerBeanDefinition(String originalConsumerBinding)
    Set up the bean definition for the retry consumer for the non-blocking case.
    protected String
    determineBinderType(String fullyQualifiedOriginalConsumerBinding)
    Determine the implementation type of the binder associated with a consumer binding
    int
     
    void
    postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
     
    void
    postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
     
    void
    setEnvironment(org.springframework.core.env.Environment environment)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor

      public NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor()
  • 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
    • buildErrorHandler

      protected org.springframework.beans.factory.support.RootBeanDefinition buildErrorHandler(String originalConsumerBinding, NonBlockingFixedRetryInfo retryInfo)
      Establish the error handler bean definition responsible for navigating the retry lifecycle for the non-blocking case.
      Parameters:
      originalConsumerBinding - The simple name of the original consumer binding
      retryInfo - The individual non-blocking retry config
      Returns:
      The bean definition
    • buildRetryConsumerBeanDefinition

      protected org.springframework.beans.factory.support.RootBeanDefinition buildRetryConsumerBeanDefinition(String originalConsumerBinding)
      Set up the bean definition for the retry consumer for the non-blocking case.
      Parameters:
      originalConsumerBinding - The simple name of the original consumer binding
      Returns:
      The bean definition
      See Also:
    • buildPubSubConsumer

      protected org.springframework.beans.factory.support.RootBeanDefinition buildPubSubConsumer()
      Set up the PubSub specific bean definition for the retry consumer for the non-blocking case.
      Returns:
      The bean definition
      See Also:
    • buildKafkaConsumer

      protected org.springframework.beans.factory.support.RootBeanDefinition buildKafkaConsumer()
      Set up the Kafka specific bean definition for the retry consumer for the non-blocking case.
      Returns:
      The bean definition
      See Also:
    • 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