public class SubscribableRedisChannel
extends org.springframework.integration.channel.AbstractMessageChannel
implements org.springframework.integration.channel.BroadcastCapableChannel, org.springframework.context.SmartLifecycle
AbstractMessageChannel implementation with BroadcastCapableChannel
aspect to provide a pub-sub semantics to consume messages fgrom Redis topic.interceptors, meters| Constructor and Description |
|---|
SubscribableRedisChannel(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
java.lang.String topicName) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected boolean |
doSend(org.springframework.messaging.Message<?> message,
long arg1) |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
onInit() |
void |
setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the
channel's dispatcher.
|
void |
setMessageConverter(org.springframework.messaging.converter.MessageConverter messageConverter) |
void |
setSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> serializer) |
void |
setTaskExecutor(java.util.concurrent.Executor taskExecutor) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
boolean |
subscribe(org.springframework.messaging.MessageHandler handler) |
boolean |
unsubscribe(org.springframework.messaging.MessageHandler handler) |
addInterceptor, addInterceptor, configureMetrics, 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, 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, waitisBroadcastpublic SubscribableRedisChannel(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
java.lang.String topicName)
public void setTaskExecutor(java.util.concurrent.Executor taskExecutor)
public void setMessageConverter(org.springframework.messaging.converter.MessageConverter messageConverter)
setMessageConverter in class org.springframework.integration.channel.AbstractMessageChannelpublic void setSerializer(org.springframework.data.redis.serializer.RedisSerializer<?> serializer)
public void setMaxSubscribers(int maxSubscribers)
maxSubscribers - The maximum number of subscribers allowed.public boolean subscribe(org.springframework.messaging.MessageHandler handler)
subscribe in interface org.springframework.messaging.SubscribableChannelpublic boolean unsubscribe(org.springframework.messaging.MessageHandler handler)
unsubscribe in interface org.springframework.messaging.SubscribableChannelprotected boolean doSend(org.springframework.messaging.Message<?> message,
long arg1)
doSend in class org.springframework.integration.channel.AbstractMessageChannelpublic void onInit()
onInit in class org.springframework.integration.channel.AbstractMessageChannelpublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic int getPhase()
getPhase in interface org.springframework.context.PhasedgetPhase in interface org.springframework.context.SmartLifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeandestroy in interface org.springframework.integration.support.management.IntegrationManagementdestroy in class org.springframework.integration.channel.AbstractMessageChannel