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 TypeMethodDescriptionprotected 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 bindingint
getOrder()
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)
-
Constructor Details
-
NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor
public NonBlockingRetryConsumerBeanDefinitionRegistryPostProcessor()
-
-
Method Details
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactory
in interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
- Specified by:
postProcessBeanFactory
in interfaceorg.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 interfaceorg.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 bindingretryInfo
- 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
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
-