public class SubscribableKafkaChannel extends AbstractKafkaChannel implements SubscribableChannel, SmartLifecycle
AbstractMessageChannel.ChannelInterceptorListIntegrationManagement.ManagementOverrideslogger, topicinterceptors, metersEXPRESSION_PARSERINDEFINITE_TIMEOUTMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
SubscribableKafkaChannel(org.springframework.kafka.core.KafkaOperations<?,?> template,
org.springframework.kafka.config.KafkaListenerContainerFactory<?> factory,
String channelTopic)
Construct an instance with the provided parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected MessageDispatcher |
createDispatcher() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setAutoStartup(boolean autoStartup)
Set the auto startup.
|
void |
setPhase(int phase)
Set the phase.
|
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
boolean |
subscribe(MessageHandler handler) |
boolean |
unsubscribe(MessageHandler handler) |
doSend, getGroupId, setGroupIdaddInterceptor, addInterceptor, configureMetrics, destroy, getComponentType, getErrorRate, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMetricsCaptor, getMinSendDuration, getOverrides, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isLoggingEnabled, isStatsEnabled, registerMetricsCaptor, removeInterceptor, removeInterceptor, reset, send, send, setCountsEnabled, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsend, sendgetBeanName, getComponentNamesendCount, sendErrorCountpublic SubscribableKafkaChannel(org.springframework.kafka.core.KafkaOperations<?,?> template,
org.springframework.kafka.config.KafkaListenerContainerFactory<?> factory,
String channelTopic)
template - template for sending.factory - factory for creating a container for receiving.channelTopic - the topic.public int getPhase()
getPhase in interface PhasedgetPhase in interface SmartLifecyclepublic void setPhase(int phase)
phase - the phase.Phasedpublic void setAutoStartup(boolean autoStartup)
autoStartup - true to automatically start.SmartLifecyclepublic boolean isAutoStartup()
isAutoStartup in interface SmartLifecycleprotected void onInit()
IntegrationObjectSupportonInit in class AbstractMessageChannelprotected MessageDispatcher createDispatcher()
public void stop(Runnable callback)
stop in interface SmartLifecyclepublic boolean subscribe(MessageHandler handler)
subscribe in interface SubscribableChannelpublic boolean unsubscribe(MessageHandler handler)
unsubscribe in interface SubscribableChannel