public class ReactiveRedisStreamMessageHandler extends AbstractReactiveMessageHandler
ReactiveMessageHandler which writes
Message payload or Message itself (see extractPayload) into a Redis stream using Reactive Stream operations.IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCEMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
ReactiveRedisStreamMessageHandler(ReactiveRedisConnectionFactory connectionFactory,
Expression streamKeyExpression)
Create an instance based on provided
ReactiveRedisConnectionFactory and expression for stream key. |
ReactiveRedisStreamMessageHandler(ReactiveRedisConnectionFactory connectionFactory,
String streamKey)
Create an instance based on provided
ReactiveRedisConnectionFactory and key for stream. |
| Modifier and Type | Method and Description |
|---|---|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected reactor.core.publisher.Mono<Void> |
handleMessageInternal(Message<?> message) |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setExtractPayload(boolean extractPayload)
Set to
true to extract the payload; otherwise
the entire message is sent. |
void |
setHashMapper(HashMapper<String,?,?> hashMapper)
(Optional) Set the
HashMapper used to create reactiveStreamOperations. |
void |
setSerializationContext(RedisSerializationContext<String,?> serializationContext) |
handleMessagebuildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackafterPropertiesSet, 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, waitgetThisAsgetBeanName, getComponentNamepublic ReactiveRedisStreamMessageHandler(ReactiveRedisConnectionFactory connectionFactory, String streamKey)
ReactiveRedisConnectionFactory and key for stream.connectionFactory - the ReactiveRedisConnectionFactory to usestreamKey - the key for streampublic ReactiveRedisStreamMessageHandler(ReactiveRedisConnectionFactory connectionFactory, Expression streamKeyExpression)
ReactiveRedisConnectionFactory and expression for stream key.connectionFactory - the ReactiveRedisConnectionFactory to usestreamKeyExpression - the SpEL expression to evaluate a key for streampublic void setSerializationContext(RedisSerializationContext<String,?> serializationContext)
public void setHashMapper(@Nullable HashMapper<String,?,?> hashMapper)
HashMapper used to create reactiveStreamOperations.
The default HashMapper is defined from the provided RedisSerializationContexthashMapper - the wanted hashMapperpublic void setExtractPayload(boolean extractPayload)
true to extract the payload; otherwise
the entire message is sent. Default true.extractPayload - false to not extract.public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class MessageHandlerSupportprotected void onInit()
IntegrationObjectSupportonInit in class IntegrationObjectSupportprotected reactor.core.publisher.Mono<Void> handleMessageInternal(Message<?> message)
handleMessageInternal in class AbstractReactiveMessageHandler