org.springframework.integration.kafka.listener
Class KafkaMessageListenerContainer
java.lang.Object
org.springframework.integration.kafka.listener.KafkaMessageListenerContainer
- All Implemented Interfaces:
- org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
public class KafkaMessageListenerContainer
- extends java.lang.Object
- implements org.springframework.context.SmartLifecycle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyFunction
public static final com.gs.collections.api.block.function.Function<java.util.Map.Entry<Partition,?>,Partition> keyFunction
autoStartup
public boolean autoStartup
KafkaMessageListenerContainer
public KafkaMessageListenerContainer(ConnectionFactory connectionFactory,
Partition... partitions)
KafkaMessageListenerContainer
public KafkaMessageListenerContainer(ConnectionFactory connectionFactory,
java.lang.String... topics)
getOffsetManager
public OffsetManager getOffsetManager()
setOffsetManager
public void setOffsetManager(OffsetManager offsetManager)
getMessageListener
public MessageListener getMessageListener()
setMessageListener
public void setMessageListener(MessageListener messageListener)
getErrorHandler
public ErrorHandler getErrorHandler()
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
getConcurrency
public int getConcurrency()
setConcurrency
public void setConcurrency(int concurrency)
- The maximum number of concurrent
MessageListener
s running. Messages from within the same
partition will be processed sequentially.
- Parameters:
concurrency
- the concurrency maximum number
getFetchTaskExecutor
public java.util.concurrent.Executor getFetchTaskExecutor()
setFetchTaskExecutor
public void setFetchTaskExecutor(java.util.concurrent.Executor fetchTaskExecutor)
- The task executor for fetch operations
- Parameters:
fetchTaskExecutor
- the Executor for fetch operations
getAdminTaskExecutor
public java.util.concurrent.Executor getAdminTaskExecutor()
- Returns:
- the task executor for leader and offset updates.
setAdminTaskExecutor
public void setAdminTaskExecutor(java.util.concurrent.Executor adminTaskExecutor)
getMaxFetch
public int getMaxFetch()
- Returns:
- the maximum amount of data (in bytes) that pollers will fetch in one round
getQueueSize
public int getQueueSize()
setQueueSize
public void setQueueSize(int queueSize)
- The maximum number of messages that are buffered by each concurrent
MessageListener
runner.
Increasing the value may increase throughput, but also increases the memory consumption.
- Parameters:
queueSize
- the queue size
setMaxFetch
public void setMaxFetch(int maxFetch)
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartup
in interface org.springframework.context.SmartLifecycle
setAutoStartup
public void setAutoStartup(boolean autoStartup)
stop
public void stop(java.lang.Runnable callback)
- Specified by:
stop
in interface org.springframework.context.SmartLifecycle
start
public void start()
- Specified by:
start
in interface org.springframework.context.Lifecycle
stop
public void stop()
- Specified by:
stop
in interface org.springframework.context.Lifecycle
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface org.springframework.context.Lifecycle
getPhase
public int getPhase()
- Specified by:
getPhase
in interface org.springframework.context.Phased