public class SubscribableKafkaChannel extends AbstractKafkaChannel implements SubscribableChannel, ManageableSmartLifecycle
AbstractMessageChannel.ChannelInterceptorList
IntegrationManagement.ManagementOverrides
topic
interceptors, meters
EXPRESSION_PARSER, logger
INDEFINITE_TIMEOUT
METER_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, setGroupId
addInterceptor, addInterceptor, destroy, getComponentType, getFullChannelName, getIChannelInterceptorList, getIntegrationPatternType, getInterceptors, getMetricsCaptor, getOverrides, isLoggingEnabled, registerMetricsCaptor, removeInterceptor, removeInterceptor, send, send, setDatatypes, setInterceptors, setLoggingEnabled, setMessageConverter, setShouldTrack
afterPropertiesSet, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
getBeanName, getComponentName
public 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 Phased
getPhase
in interface SmartLifecycle
public void setPhase(int phase)
phase
- the phase.Phased
public boolean isRunning()
isRunning
in interface Lifecycle
isRunning
in interface ManageableLifecycle
public void setAutoStartup(boolean autoStartup)
autoStartup
- true to automatically start.SmartLifecycle
public boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle
protected void onInit()
IntegrationObjectSupport
onInit
in class AbstractMessageChannel
protected MessageDispatcher createDispatcher()
public void start()
start
in interface Lifecycle
start
in interface ManageableLifecycle
public void stop()
stop
in interface Lifecycle
stop
in interface ManageableLifecycle
public void stop(Runnable callback)
stop
in interface SmartLifecycle
public boolean subscribe(MessageHandler handler)
subscribe
in interface SubscribableChannel
public boolean unsubscribe(MessageHandler handler)
unsubscribe
in interface SubscribableChannel