public class StreamRabbitListenerContainerFactory extends BaseRabbitListenerContainerFactory<StreamListenerContainer>
Constructor and Description |
---|
StreamRabbitListenerContainerFactory(com.rabbitmq.stream.Environment environment)
Construct an instance using the provided environment.
|
Modifier and Type | Method and Description |
---|---|
protected StreamListenerContainer |
createContainerInstance()
Create an instance of the listener container.
|
StreamListenerContainer |
createListenerContainer(RabbitListenerEndpoint endpoint)
Create a
MessageListenerContainer for the given
RabbitListenerEndpoint . |
void |
setConsumerCustomizer(Consumer<com.rabbitmq.stream.ConsumerBuilder> consumerCustomizer)
Customize the consumer builder before it is built.
|
void |
setContainerCustomizer(ContainerCustomizer<StreamListenerContainer> containerCustomizer)
Set a
ContainerCustomizer that is invoked after a container is created and
configured to enable further customization of the container. |
void |
setNativeListener(boolean nativeListener)
Set to true to create a container supporting a native RabbitMQ Stream message.
|
applyCommonOverrides, getDefaultRequeueRejected, setBeforeSendReplyPostProcessors, setDefaultRequeueRejected, setReplyRecoveryCallback, setRetryTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createListenerContainer
public StreamRabbitListenerContainerFactory(com.rabbitmq.stream.Environment environment)
environment
- the environment.public void setNativeListener(boolean nativeListener)
nativeListener
- true for native listeners.public void setConsumerCustomizer(Consumer<com.rabbitmq.stream.ConsumerBuilder> consumerCustomizer)
consumerCustomizer
- the customizer.public void setContainerCustomizer(ContainerCustomizer<StreamListenerContainer> containerCustomizer)
ContainerCustomizer
that is invoked after a container is created and
configured to enable further customization of the container.containerCustomizer
- the customizer.public StreamListenerContainer createListenerContainer(RabbitListenerEndpoint endpoint)
RabbitListenerContainerFactory
MessageListenerContainer
for the given
RabbitListenerEndpoint
.createListenerContainer
in interface RabbitListenerContainerFactory<StreamListenerContainer>
createListenerContainer
in class BaseRabbitListenerContainerFactory<StreamListenerContainer>
endpoint
- the endpoint to configure.protected StreamListenerContainer createContainerInstance()