Class RedisStreamInboundChannelAdapterSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,P>
org.springframework.integration.dsl.MessageProducerSpec<RedisStreamInboundChannelAdapterSpec,ReactiveRedisStreamMessageProducer>
org.springframework.integration.redis.dsl.RedisStreamInboundChannelAdapterSpec
- All Implemented Interfaces:
DisposableBean,FactoryBean<ReactiveRedisStreamMessageProducer>,InitializingBean,Lifecycle,Phased,SmartLifecycle
public class RedisStreamInboundChannelAdapterSpec
extends MessageProducerSpec<RedisStreamInboundChannelAdapterSpec,ReactiveRedisStreamMessageProducer>
- Since:
- 7.1
- Author:
- Jiandong Ma
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRedisStreamInboundChannelAdapterSpec(ReactiveRedisConnectionFactory connectionFactory, String streamKey) -
Method Summary
Modifier and TypeMethodDescriptionautoAck(boolean autoAck) Specify whether acknowledge message read in the Consumer Group.batchSize(int recordsPerPoll) Specify the batch size for the COUNT option.consumerGroup(String consumerGroup) Specify the name of the consumer group.consumerName(@Nullable String consumerName) Specify the name of the consumer.createConsumerGroup(boolean createConsumerGroup) Specify whether create the consumer group.errorResumeFunction(Function<? super Throwable, ? extends org.reactivestreams.Publisher<Void>> resumeFunction) Specify the resume Function when polling the stream fails.extractPayload(boolean extractPayload) Specify whether extract payload.objectMapper(HashMapper<?, ?, ?> hashMapper) Specify the hashMapper.pollTimeout(Duration pollTimeout) Specify the poll timeout for the BLOCK option.readOffset(ReadOffset readOffset) Specify the offset from which to read message.Specify the key, hash key and hash value serializer.streamReceiverOptions(@Nullable StreamReceiver.StreamReceiverOptions<String, ?> streamReceiverOptions) Specify the streamReceiverOptions to customize theStreamReceiver.targetType(Class<?> targetType) Specify the hash target type.Methods inherited from class org.springframework.integration.dsl.MessageProducerSpec
autoStartup, errorChannel, errorChannel, errorMessageStrategy, id, observationConvention, outputChannel, outputChannel, phase, role, sendTimeout, shouldTrackMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingletonMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable
-
Constructor Details
-
RedisStreamInboundChannelAdapterSpec
protected RedisStreamInboundChannelAdapterSpec(ReactiveRedisConnectionFactory connectionFactory, String streamKey)
-
-
Method Details
-
readOffset
Specify the offset from which to read message.- Parameters:
readOffset- the readOffset- Returns:
- the spec
- See Also:
-
extractPayload
Specify whether extract payload.- Parameters:
extractPayload- the extractPayload- Returns:
- the spec
- See Also:
-
autoAck
Specify whether acknowledge message read in the Consumer Group.- Parameters:
autoAck- the acknowledge option- Returns:
- the spec
- See Also:
-
consumerGroup
Specify the name of the consumer group.- Parameters:
consumerGroup- the consumerGroup- Returns:
- the spec
- See Also:
-
consumerName
Specify the name of the consumer.- Parameters:
consumerName- the consumerName- Returns:
- the spec
- See Also:
-
createConsumerGroup
Specify whether create the consumer group.- Parameters:
createConsumerGroup- the createConsumerGroup- Returns:
- the spec
- See Also:
-
streamReceiverOptions
public RedisStreamInboundChannelAdapterSpec streamReceiverOptions(@Nullable StreamReceiver.StreamReceiverOptions<String, ?> streamReceiverOptions) Specify the streamReceiverOptions to customize theStreamReceiver.- Parameters:
streamReceiverOptions- the streamReceiverOptions- Returns:
- the spec
- See Also:
-
pollTimeout
Specify the poll timeout for the BLOCK option.- Parameters:
pollTimeout- the pollTimeout- Returns:
- the spec
- See Also:
-
batchSize
Specify the batch size for the COUNT option.- Parameters:
recordsPerPoll- the recordsPerPoll- Returns:
- the spec
- See Also:
-
errorResumeFunction
public RedisStreamInboundChannelAdapterSpec errorResumeFunction(Function<? super Throwable, ? extends org.reactivestreams.Publisher<Void>> resumeFunction) Specify the resume Function when polling the stream fails.- Parameters:
resumeFunction- the resumeFunction- Returns:
- the spec
- See Also:
-
serializer
public RedisStreamInboundChannelAdapterSpec serializer(RedisSerializationContext.SerializationPair<?> pair) Specify the key, hash key and hash value serializer.- Parameters:
pair- the pair- Returns:
- the spec
- See Also:
-
targetType
Specify the hash target type.- Parameters:
targetType- the targetType- Returns:
- the spec
- See Also:
-
objectMapper
Specify the hashMapper.- Parameters:
hashMapper- the hashMapper- Returns:
- the spec
- See Also:
-