Class StreamRabbitListenerContainerFactory
- java.lang.Object
-
- org.springframework.amqp.rabbit.config.BaseRabbitListenerContainerFactory<StreamListenerContainer>
-
- org.springframework.rabbit.stream.config.StreamRabbitListenerContainerFactory
-
- All Implemented Interfaces:
org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory<StreamListenerContainer>
public class StreamRabbitListenerContainerFactory extends org.springframework.amqp.rabbit.config.BaseRabbitListenerContainerFactory<StreamListenerContainer>
Factory for StreamListenerContainer.- Since:
- 2.4
-
-
Constructor Summary
Constructors Constructor Description StreamRabbitListenerContainerFactory(com.rabbitmq.stream.Environment environment)Construct an instance using the provided environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StreamListenerContainercreateContainerInstance()Create an instance of the listener container.StreamListenerContainercreateListenerContainer(org.springframework.amqp.rabbit.listener.RabbitListenerEndpoint endpoint)voidsetConsumerCustomizer(ConsumerCustomizer consumerCustomizer)Customize the consumer builder before it is built.voidsetContainerCustomizer(org.springframework.amqp.rabbit.config.ContainerCustomizer<StreamListenerContainer> containerCustomizer)Set aContainerCustomizerthat is invoked after a container is created and configured to enable further customization of the container.voidsetNativeListener(boolean nativeListener)Set to true to create a container supporting a native RabbitMQ Stream message.-
Methods inherited from class org.springframework.amqp.rabbit.config.BaseRabbitListenerContainerFactory
applyCommonOverrides, getDefaultRequeueRejected, setBeforeSendReplyPostProcessors, setDefaultRequeueRejected, setReplyRecoveryCallback, setRetryTemplate
-
-
-
-
Method Detail
-
setNativeListener
public void setNativeListener(boolean nativeListener)
Set to true to create a container supporting a native RabbitMQ Stream message.- Parameters:
nativeListener- true for native listeners.
-
setConsumerCustomizer
public void setConsumerCustomizer(ConsumerCustomizer consumerCustomizer)
Customize the consumer builder before it is built.- Parameters:
consumerCustomizer- the customizer.
-
setContainerCustomizer
public void setContainerCustomizer(org.springframework.amqp.rabbit.config.ContainerCustomizer<StreamListenerContainer> containerCustomizer)
Set aContainerCustomizerthat is invoked after a container is created and configured to enable further customization of the container.- Parameters:
containerCustomizer- the customizer.
-
createListenerContainer
public StreamListenerContainer createListenerContainer(org.springframework.amqp.rabbit.listener.RabbitListenerEndpoint endpoint)
- Specified by:
createListenerContainerin interfaceorg.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory<StreamListenerContainer>- Specified by:
createListenerContainerin classorg.springframework.amqp.rabbit.config.BaseRabbitListenerContainerFactory<StreamListenerContainer>
-
createContainerInstance
protected StreamListenerContainer createContainerInstance()
Create an instance of the listener container.- Returns:
- the container.
-
-