Class ConcurrentPulsarListenerContainerFactory<T>
java.lang.Object
org.springframework.pulsar.config.AbstractPulsarListenerContainerFactory<ConcurrentPulsarMessageListenerContainer<T>,T>
org.springframework.pulsar.config.ConcurrentPulsarListenerContainerFactory<T>
- Type Parameters:
T
- message type in the listener.
- All Implemented Interfaces:
Aware
,ApplicationContextAware
,ApplicationEventPublisherAware
,ListenerContainerFactory<PulsarMessageListenerContainer,
,PulsarListenerEndpoint> PulsarContainerFactory<PulsarMessageListenerContainer,
,PulsarListenerEndpoint> PulsarListenerContainerFactory
public class ConcurrentPulsarListenerContainerFactory<T>
extends AbstractPulsarListenerContainerFactory<ConcurrentPulsarMessageListenerContainer<T>,T>
Concrete implementation for
PulsarListenerContainerFactory
.- Author:
- Soby Chacko, Chris Bono, Alexander Preuß, Vedran Pavic, Daniel Szabo
-
Field Summary
Fields inherited from class org.springframework.pulsar.config.AbstractPulsarListenerContainerFactory
logger
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentPulsarListenerContainerFactory
(PulsarConsumerFactory<? super T> consumerFactory, PulsarContainerProperties containerProperties) -
Method Summary
Modifier and TypeMethodDescriptioncreateContainer
(String... topics) Create and configure a container without a listener.protected ConcurrentPulsarMessageListenerContainer<T>
protected void
initializeContainer
(ConcurrentPulsarMessageListenerContainer<T> instance, PulsarListenerEndpoint endpoint) void
setConcurrency
(Integer concurrency) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.springframework.pulsar.config.AbstractPulsarListenerContainerFactory
createRegisteredContainer, getConsumerFactory, getContainerProperties, setApplicationContext, setApplicationEventPublisher, setAutoStartup, setBatchListener, setMessageConverter, setPhase
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.pulsar.config.ListenerContainerFactory
createListenerContainer
-
Constructor Details
-
ConcurrentPulsarListenerContainerFactory
public ConcurrentPulsarListenerContainerFactory(PulsarConsumerFactory<? super T> consumerFactory, PulsarContainerProperties containerProperties)
-
-
Method Details
-
setConcurrency
Deprecated, for removal: This API element is subject to removal in a future version.Specify the container concurrency.- Parameters:
concurrency
- the number of consumers to create.
-
createContainer
Description copied from interface:PulsarContainerFactory
Create and configure a container without a listener. Containers created using this method are not added to the listener endpoint registry.- Parameters:
topics
- the topics.- Returns:
- the container.
-
createContainerInstance
protected ConcurrentPulsarMessageListenerContainer<T> createContainerInstance(PulsarListenerEndpoint endpoint) - Specified by:
createContainerInstance
in classAbstractPulsarListenerContainerFactory<ConcurrentPulsarMessageListenerContainer<T>,
T>
-
initializeContainer
protected void initializeContainer(ConcurrentPulsarMessageListenerContainer<T> instance, PulsarListenerEndpoint endpoint) - Overrides:
initializeContainer
in classAbstractPulsarListenerContainerFactory<ConcurrentPulsarMessageListenerContainer<T>,
T>
-