Interface ReactiveStreamCommands
- All Known Subinterfaces:
ReactiveClusterStreamCommands
public interface ReactiveStreamCommands
Stream-specific Redis commands executed using reactive infrastructure.
- Since:
- 2.2
- Author:
- Mark Paluch, Christoph Strobl, Tugdual Grall, Dengliming, Mark John Moreno
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
XACK
command parameters.static class
XADD
command parameters.static class
XDEL
command parameters.static class
static class
Value Object holding parameters for obtaining pending messages.static class
XRANGE
/XREVRANGE
command parameters.static class
XRANGE
/XREVRANGE
command parameters.static class
XTRIM
command parameters.static class
XCLAIM
command parameters.static class
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.ReadCommand,
reactor.core.publisher.Flux<ByteBufferRecord>>> read
(org.reactivestreams.Publisher<ReactiveStreamCommands.ReadCommand> commands) Read records from one or moreStreamOffset
s.default reactor.core.publisher.Mono<Long>
xAck
(ByteBuffer key, String group, String... recordIds) Acknowledge one or more records as processed.default reactor.core.publisher.Mono<Long>
xAck
(ByteBuffer key, String group, RecordId... recordIds) Acknowledge one or more records as processed.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStreamCommands.AcknowledgeCommand,
Long>> xAck
(org.reactivestreams.Publisher<ReactiveStreamCommands.AcknowledgeCommand> commands) Acknowledge one or more records as processed.default reactor.core.publisher.Mono<RecordId>
xAdd
(ByteBuffer key, Map<ByteBuffer, ByteBuffer> body) Add stream record with given body to key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.AddStreamRecord,
RecordId>> xAdd
(org.reactivestreams.Publisher<ReactiveStreamCommands.AddStreamRecord> commands) Add stream record with given body to key.default reactor.core.publisher.Mono<RecordId>
xAdd
(ByteBufferRecord record) Add stream record with given body to key.default reactor.core.publisher.Flux<ByteBufferRecord>
Change the ownership of a pending message to the given new consumer.default reactor.core.publisher.Flux<ByteBufferRecord>
xClaim
(ByteBuffer key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XClaimCommand,
reactor.core.publisher.Flux<ByteBufferRecord>>> xClaim
(org.reactivestreams.Publisher<ReactiveStreamCommands.XClaimCommand> commands) Change the ownership of a pending message to the given new consumer.default reactor.core.publisher.Flux<RecordId>
xClaimJustId
(ByteBuffer key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer without increasing the delivered count.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XClaimCommand,
reactor.core.publisher.Flux<RecordId>>> xClaimJustId
(org.reactivestreams.Publisher<ReactiveStreamCommands.XClaimCommand> commands) Change the ownership of a pending message to the given new consumer without increasing the delivered count.default reactor.core.publisher.Mono<Long>
xDel
(ByteBuffer key, String... recordIds) Removes the specified entries from the stream.default reactor.core.publisher.Mono<Long>
xDel
(ByteBuffer key, RecordId... recordIds) Removes the specified entries from the stream.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.DeleteCommand,
Long>> xDel
(org.reactivestreams.Publisher<ReactiveStreamCommands.DeleteCommand> commands) Removes the specified entries from the stream.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.GroupCommand,
String>> xGroup
(org.reactivestreams.Publisher<ReactiveStreamCommands.GroupCommand> commands) Execute the givenReactiveStreamCommands.GroupCommand
to create, destroy,... groups.default reactor.core.publisher.Mono<String>
Execute the givenReactiveStreamCommands.GroupCommand
to create, destroy,... groups.default reactor.core.publisher.Mono<String>
xGroupCreate
(ByteBuffer key, String groupName, ReadOffset readOffset) Create a consumer group.default reactor.core.publisher.Mono<String>
xGroupCreate
(ByteBuffer key, String groupName, ReadOffset readOffset, boolean mkStream) Create a consumer group.default reactor.core.publisher.Mono<String>
xGroupDelConsumer
(ByteBuffer key, String groupName, String consumerName) Delete a consumer from a consumer group.default reactor.core.publisher.Mono<String>
xGroupDelConsumer
(ByteBuffer key, Consumer consumer) Delete a consumer from a consumer group.default reactor.core.publisher.Mono<String>
xGroupDestroy
(ByteBuffer key, String groupName) Destroy a consumer group.default reactor.core.publisher.Mono<StreamInfo.XInfoStream>
xInfo
(ByteBuffer key) Obtain general information about the stream stored at the specified key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XInfoCommand,
StreamInfo.XInfoStream>> xInfo
(org.reactivestreams.Publisher<ReactiveStreamCommands.XInfoCommand> commands) Obtain general information about the stream stored at the specified key.default reactor.core.publisher.Flux<StreamInfo.XInfoConsumer>
xInfoConsumers
(ByteBuffer key, String groupName) Obtain information about every consumer in a specific consumer group for the stream stored at the specified key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XInfoCommand,
reactor.core.publisher.Flux<StreamInfo.XInfoConsumer>>> xInfoConsumers
(org.reactivestreams.Publisher<ReactiveStreamCommands.XInfoCommand> commands) Obtain information about every consumer in a specific consumer group for the stream stored at the specified key.default reactor.core.publisher.Flux<StreamInfo.XInfoGroup>
xInfoGroups
(ByteBuffer key) Obtain general information about the stream stored at the specified key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XInfoCommand,
reactor.core.publisher.Flux<StreamInfo.XInfoGroup>>> xInfoGroups
(org.reactivestreams.Publisher<ReactiveStreamCommands.XInfoCommand> commands) Obtain general information about the stream stored at the specified key.default reactor.core.publisher.Mono<Long>
xLen
(ByteBuffer key) Get the size of the stream stored at key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,
Long>> xLen
(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get the size of the stream stored atReactiveRedisConnection.KeyCommand.getKey()
default reactor.core.publisher.Mono<PendingMessagesSummary>
xPending
(ByteBuffer key, String groupName) Obtain thePendingMessagesSummary
for a given consumer group.default reactor.core.publisher.Mono<PendingMessages>
xPending
(ByteBuffer key, String groupName, String consumerName) Obtained detailed information about all pending messages for a given consumer.default reactor.core.publisher.Mono<PendingMessages>
default reactor.core.publisher.Mono<PendingMessages>
xPending
(ByteBuffer key, String groupName, Range<?> range, Long count) default reactor.core.publisher.Mono<PendingMessages>
xPending
(ByteBuffer key, Consumer consumer) Obtained detailed information about all pending messages for a givenConsumer
.default reactor.core.publisher.Mono<PendingMessages>
xPending
(ByteBuffer key, Consumer consumer, Range<?> range, Long count) reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.PendingRecordsCommand,
PendingMessages>> xPending
(org.reactivestreams.Publisher<ReactiveStreamCommands.PendingRecordsCommand> commands) reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.PendingRecordsCommand,
PendingMessagesSummary>> xPendingSummary
(org.reactivestreams.Publisher<ReactiveStreamCommands.PendingRecordsCommand> commands) Obtain thePendingMessagesSummary
for a given consumer group.default reactor.core.publisher.Flux<ByteBufferRecord>
xRange
(ByteBuffer key, Range<String> range) Read records from a stream within a specificRange
.default reactor.core.publisher.Flux<ByteBufferRecord>
xRange
(ByteBuffer key, Range<String> range, Limit limit) reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.RangeCommand,
reactor.core.publisher.Flux<ByteBufferRecord>>> xRange
(org.reactivestreams.Publisher<ReactiveStreamCommands.RangeCommand> commands) default reactor.core.publisher.Flux<ByteBufferRecord>
xRead
(StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s.default reactor.core.publisher.Flux<ByteBufferRecord>
xRead
(StreamReadOptions readOptions, StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s.default reactor.core.publisher.Flux<ByteBufferRecord>
xReadGroup
(Consumer consumer, StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s using a consumer group.default reactor.core.publisher.Flux<ByteBufferRecord>
xReadGroup
(Consumer consumer, StreamReadOptions readOptions, StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s using a consumer group.default reactor.core.publisher.Flux<ByteBufferRecord>
xRevRange
(ByteBuffer key, Range<String> range) Read records from a stream within a specificRange
in reverse order.default reactor.core.publisher.Flux<ByteBufferRecord>
xRevRange
(ByteBuffer key, Range<String> range, Limit limit) reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.RangeCommand,
reactor.core.publisher.Flux<ByteBufferRecord>>> xRevRange
(org.reactivestreams.Publisher<ReactiveStreamCommands.RangeCommand> commands) default reactor.core.publisher.Mono<Long>
xTrim
(ByteBuffer key, long count) Trims the stream tocount
elements.default reactor.core.publisher.Mono<Long>
xTrim
(ByteBuffer key, long count, boolean approximateTrimming) Trims the stream tocount
elements.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,
Long>> xTrim
(org.reactivestreams.Publisher<ReactiveStreamCommands.TrimCommand> commands) Trims the stream tocount
elements.
-
Method Details
-
xAck
Acknowledge one or more records as processed.- Parameters:
key
- the stream key.group
- name of the consumer group.recordIds
- record Id's to acknowledge.- Returns:
Mono
emitting the nr of acknowledged messages.- See Also:
-
xAck
Acknowledge one or more records as processed.- Parameters:
key
- the stream key.group
- name of the consumer group.recordIds
- record Id's to acknowledge.- Returns:
Mono
emitting the nr of acknowledged messages.- See Also:
-
xAck
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStreamCommands.AcknowledgeCommand,Long>> xAck(org.reactivestreams.Publisher<ReactiveStreamCommands.AcknowledgeCommand> commands) Acknowledge one or more records as processed.- Parameters:
commands
- must not be null.- Returns:
Flux
emitting the nr of acknowledged messages perReactiveStreamCommands.AcknowledgeCommand
.- See Also:
-
xAdd
Add stream record with given body to key.- Parameters:
key
- must not be null.body
- must not be null.- Returns:
Mono
emitting the server generatedid
.- See Also:
-
xAdd
Add stream record with given body to key.- Parameters:
record
- must not be null.- Returns:
Mono
theid
.- See Also:
-
xAdd
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.AddStreamRecord,RecordId>> xAdd(org.reactivestreams.Publisher<ReactiveStreamCommands.AddStreamRecord> commands) Add stream record with given body to key.- Parameters:
commands
- must not be null.- Returns:
Flux
emitting theRecordId
on by for for the givenReactiveStreamCommands.AddStreamRecord
commands.- See Also:
-
xClaimJustId
default reactor.core.publisher.Flux<RecordId> xClaimJustId(ByteBuffer key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer without increasing the delivered count.- Parameters:
key
- the key the stream is stored at.group
- the name of the consumer group.newOwner
- the name of the new consumer.options
- must not be null.- Returns:
- a
Flux
emittingis
that changed user. - Since:
- 2.3
- See Also:
-
xClaimJustId
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XClaimCommand,reactor.core.publisher.Flux<RecordId>>> xClaimJustId(org.reactivestreams.Publisher<ReactiveStreamCommands.XClaimCommand> commands) Change the ownership of a pending message to the given new consumer without increasing the delivered count.- Parameters:
commands
- must not be null.- Returns:
- a
Flux
emittingis
that changed user. - Since:
- 2.3
- See Also:
-
xClaim
default reactor.core.publisher.Flux<ByteBufferRecord> xClaim(ByteBuffer key, String group, String newOwner, Duration minIdleTime, RecordId... recordIds) Change the ownership of a pending message to the given new consumer.- Parameters:
key
- the key the stream is stored at.group
- the name of the consumer group.newOwner
- the name of the new consumer.minIdleTime
- must not be null.recordIds
- must not be null.- Returns:
- a
Flux
emittingByteBufferRecord
that changed user. - Since:
- 2.3
- See Also:
-
xClaim
default reactor.core.publisher.Flux<ByteBufferRecord> xClaim(ByteBuffer key, String group, String newOwner, RedisStreamCommands.XClaimOptions options) Change the ownership of a pending message to the given new consumer.- Parameters:
key
- the key the stream is stored at.group
- the name of the consumer group.newOwner
- the name of the new consumer.options
- must not be null.- Returns:
- a
Flux
emittingByteBufferRecord
that changed user. - Since:
- 2.3
- See Also:
-
xClaim
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XClaimCommand,reactor.core.publisher.Flux<ByteBufferRecord>>> xClaim(org.reactivestreams.Publisher<ReactiveStreamCommands.XClaimCommand> commands) Change the ownership of a pending message to the given new consumer.- Parameters:
commands
- must not be null.- Returns:
- Since:
- 2.3
- See Also:
-
xDel
Removes the specified entries from the stream. Returns the number of items deleted, that may be different from the number of IDs passed in case certain IDs do not exist.- Parameters:
key
- the stream key.recordIds
- stream record Id's.- Returns:
Mono
emitting the number of removed entries.- See Also:
-
xDel
Removes the specified entries from the stream. Returns the number of items deleted, that may be different from the number of IDs passed in case certain IDs do not exist.- Parameters:
key
- the stream key.recordIds
- stream record Id's.- Returns:
Mono
emitting the number of removed entries.- See Also:
-
xDel
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.DeleteCommand,Long>> xDel(org.reactivestreams.Publisher<ReactiveStreamCommands.DeleteCommand> commands) Removes the specified entries from the stream. Returns the number of items deleted, that may be different from the number of IDs passed in case certain IDs do not exist.- Parameters:
commands
- must not be null.- Returns:
Mono
emitting the number of removed entries.- See Also:
-
xLen
Get the size of the stream stored at key.- Parameters:
key
- must not be null.- Returns:
Mono
emitting the length of the stream.- See Also:
-
xLen
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> xLen(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get the size of the stream stored atReactiveRedisConnection.KeyCommand.getKey()
- Parameters:
commands
- must not be null.- Returns:
Flux
emitting the length of the stream perReactiveRedisConnection.KeyCommand
.- See Also:
-
xPending
default reactor.core.publisher.Mono<PendingMessagesSummary> xPending(ByteBuffer key, String groupName) Obtain thePendingMessagesSummary
for a given consumer group.- Parameters:
key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.- Returns:
Mono
emitting a summary of pending messages within the given consumer group.- Since:
- 2.3
- See Also:
-
xPendingSummary
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.PendingRecordsCommand,PendingMessagesSummary>> xPendingSummary(org.reactivestreams.Publisher<ReactiveStreamCommands.PendingRecordsCommand> commands) Obtain thePendingMessagesSummary
for a given consumer group.- Parameters:
commands
- must not be null..- Returns:
Flux
emitting a summary of pending messages within the given consumer group one by one.- Since:
- 2.3
- See Also:
-
xPending
@Nullable default reactor.core.publisher.Mono<PendingMessages> xPending(ByteBuffer key, Consumer consumer) Obtained detailed information about all pending messages for a givenConsumer
.- Parameters:
key
- the key the stream is stored at. Must not be null.consumer
- the consumer to fetchPendingMessages
for. Must not be null.- Returns:
Mono
emitting pending messages for the givenConsumer
.- Since:
- 2.3
- See Also:
-
xPending
@Nullable default reactor.core.publisher.Mono<PendingMessages> xPending(ByteBuffer key, String groupName, String consumerName) Obtained detailed information about all pending messages for a given consumer.- Parameters:
key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.consumerName
- the consumer to fetchPendingMessages
for. Must not be null.- Returns:
Mono
emitting pending messages for the givenConsumer
.- Since:
- 2.3
- See Also:
-
xPending
default reactor.core.publisher.Mono<PendingMessages> xPending(ByteBuffer key, String groupName, Range<?> range, Long count) - Parameters:
key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.range
- the range of messages ids to search within. Must not be null.count
- limit the number of results. Must not be null.- Returns:
Mono
emitting pending messages for the given consumer group. transaction.- Since:
- 2.3
- See Also:
-
xPending
default reactor.core.publisher.Mono<PendingMessages> xPending(ByteBuffer key, Consumer consumer, Range<?> range, Long count) Obtain detailed information about pendingmessages
for a givenRange
andConsumer
within a consumer group.- Parameters:
key
- the key the stream is stored at. Must not be null.consumer
- the name of theConsumer
. Must not be null.range
- the range of messages ids to search within. Must not be null.count
- limit the number of results. Must not be null.- Returns:
Mono
emitting pending messages for the givenConsumer
.- Since:
- 2.3
- See Also:
-
xPending
default reactor.core.publisher.Mono<PendingMessages> xPending(ByteBuffer key, String groupName, String consumerName, Range<?> range, Long count) Obtain detailed information about pendingmessages
for a givenRange
and consumer within a consumer group.- Parameters:
key
- the key the stream is stored at. Must not be null.groupName
- the name of the consumer group. Must not be null.consumerName
- the name of the consumer. Must not be null.range
- the range of messages ids to search within. Must not be null.count
- limit the number of results. Must not be null.- Returns:
Mono
emitting pending messages for the given consumer in given consumer group.- Since:
- 2.3
- See Also:
-
xPending
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.PendingRecordsCommand,PendingMessages>> xPending(org.reactivestreams.Publisher<ReactiveStreamCommands.PendingRecordsCommand> commands) - Parameters:
commands
- must not be null.- Returns:
Flux
emitting pending messages matching given criteria.- Since:
- 2.3
- See Also:
-
xRange
Read records from a stream within a specificRange
.- Parameters:
key
- the stream key.range
- must not be null.- Returns:
Flux
emitting with members of the stream.- See Also:
-
xRange
default reactor.core.publisher.Flux<ByteBufferRecord> xRange(ByteBuffer key, Range<String> range, Limit limit) - Parameters:
key
- the stream key.range
- must not be null.limit
- must not be null.- Returns:
Flux
emitting with members of the stream.- See Also:
-
xRange
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.RangeCommand,reactor.core.publisher.Flux<ByteBufferRecord>>> xRange(org.reactivestreams.Publisher<ReactiveStreamCommands.RangeCommand> commands) - Parameters:
commands
- must not be null.- Returns:
Flux
emitting with members of the stream perReactiveStreamCommands.RangeCommand
.- See Also:
-
xRead
Read records from one or moreStreamOffset
s.- Parameters:
streams
- the streams to read from.- Returns:
Flux
emitting with members of the stream.- See Also:
-
xRead
default reactor.core.publisher.Flux<ByteBufferRecord> xRead(StreamReadOptions readOptions, StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s.- Parameters:
readOptions
- read arguments.streams
- the streams to read from.- Returns:
Flux
emitting with members of the stream.- See Also:
-
read
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.ReadCommand,reactor.core.publisher.Flux<ByteBufferRecord>>> read(org.reactivestreams.Publisher<ReactiveStreamCommands.ReadCommand> commands) Read records from one or moreStreamOffset
s.- Parameters:
commands
- must not be null.- Returns:
Flux
emitting the members of the stream perReactiveStreamCommands.ReadCommand
.- See Also:
-
xInfo
Obtain general information about the stream stored at the specified key.- Parameters:
key
- the key the stream is stored at.- Returns:
- a
Mono
emittingStreamInfo.XInfoStream
when ready. - Since:
- 2.3
-
xInfo
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XInfoCommand,StreamInfo.XInfoStream>> xInfo(org.reactivestreams.Publisher<ReactiveStreamCommands.XInfoCommand> commands) Obtain general information about the stream stored at the specified key.- Parameters:
commands
- must not be null.- Returns:
- never null.
- Since:
- 2.3
-
xInfoGroups
Obtain general information about the stream stored at the specified key.- Parameters:
key
- the key the stream is stored at.- Returns:
- a
Flux
emitting consumer group info one by one. - Since:
- 2.3
-
xInfoGroups
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XInfoCommand,reactor.core.publisher.Flux<StreamInfo.XInfoGroup>>> xInfoGroups(org.reactivestreams.Publisher<ReactiveStreamCommands.XInfoCommand> commands) Obtain general information about the stream stored at the specified key.- Parameters:
commands
- must not be null.- Returns:
- never null.
- Since:
- 2.3
-
xInfoConsumers
default reactor.core.publisher.Flux<StreamInfo.XInfoConsumer> xInfoConsumers(ByteBuffer key, String groupName) Obtain information about every consumer in a specific consumer group for the stream stored at the specified key.- Parameters:
key
- the key the stream is stored at.groupName
- name of the consumer group.- Returns:
- a
Flux
emitting consumer info one by one. - Since:
- 2.3
-
xInfoConsumers
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.XInfoCommand,reactor.core.publisher.Flux<StreamInfo.XInfoConsumer>>> xInfoConsumers(org.reactivestreams.Publisher<ReactiveStreamCommands.XInfoCommand> commands) Obtain information about every consumer in a specific consumer group for the stream stored at the specified key.- Parameters:
commands
- must not be null.- Returns:
- never null.
- Since:
- 2.3
-
xGroupCreate
default reactor.core.publisher.Mono<String> xGroupCreate(ByteBuffer key, String groupName, ReadOffset readOffset) Create a consumer group.- Parameters:
key
- key the key the stream is stored at.groupName
- name of the consumer group to create.readOffset
- the offset to start at.- Returns:
- the
Mono
emitting ok if successful.
-
xGroupCreate
default reactor.core.publisher.Mono<String> xGroupCreate(ByteBuffer key, String groupName, ReadOffset readOffset, boolean mkStream) Create a consumer group.- Parameters:
key
- key the key the stream is stored at.groupName
- name of the consumer group to create.readOffset
- the offset to start at.mkStream
- if true the group will create the stream if needed (MKSTREAM)- Returns:
- the
Mono
emitting ok if successful. - Since:
- 2.3
-
xGroupDelConsumer
@Nullable default reactor.core.publisher.Mono<String> xGroupDelConsumer(ByteBuffer key, String groupName, String consumerName) Delete a consumer from a consumer group.- Parameters:
key
- the key the stream is stored at.groupName
- the name of the group to remove the consumer from.consumerName
- the name of the consumer to remove from the group.- Returns:
- the
Mono
emitting ok if successful.
-
xGroupDelConsumer
Delete a consumer from a consumer group.- Parameters:
key
- the key the stream is stored at.consumer
- theConsumer
.- Returns:
- the
Mono
emitting ok if successful.
-
xGroupDestroy
@Nullable default reactor.core.publisher.Mono<String> xGroupDestroy(ByteBuffer key, String groupName) Destroy a consumer group.- Parameters:
key
- the key the stream is stored at.groupName
- name of the consumer group.- Returns:
- the
Mono
emitting ok if successful.
-
xGroup
Execute the givenReactiveStreamCommands.GroupCommand
to create, destroy,... groups.- Parameters:
command
- theReactiveStreamCommands.GroupCommand
to run.- Returns:
- the
Mono
emitting the command result.
-
xGroup
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.GroupCommand,String>> xGroup(org.reactivestreams.Publisher<ReactiveStreamCommands.GroupCommand> commands) Execute the givenReactiveStreamCommands.GroupCommand
to create, destroy,... groups.- Parameters:
commands
-- Returns:
Flux
emitting the results of theReactiveStreamCommands.GroupCommand
one by one.
-
xReadGroup
default reactor.core.publisher.Flux<ByteBufferRecord> xReadGroup(Consumer consumer, StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s using a consumer group.- Parameters:
consumer
- consumer/group.streams
- the streams to read from.- Returns:
Flux
emitting the members of the stream- See Also:
-
xReadGroup
default reactor.core.publisher.Flux<ByteBufferRecord> xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<ByteBuffer>... streams) Read records from one or moreStreamOffset
s using a consumer group.- Parameters:
consumer
- consumer/group.readOptions
- read arguments.streams
- the streams to read from.- Returns:
Flux
emitting the members of the stream.- See Also:
-
xRevRange
default reactor.core.publisher.Flux<ByteBufferRecord> xRevRange(ByteBuffer key, Range<String> range) Read records from a stream within a specificRange
in reverse order.- Parameters:
key
- the stream key.range
- must not be null.- Returns:
Flux
emitting the members of the stream in reverse.- See Also:
-
xRevRange
default reactor.core.publisher.Flux<ByteBufferRecord> xRevRange(ByteBuffer key, Range<String> range, Limit limit) - Parameters:
key
- the stream key.range
- must not be null.limit
- must not be null.- Returns:
Flux
emitting the members of the stream in reverse.- See Also:
-
xRevRange
reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveStreamCommands.RangeCommand,reactor.core.publisher.Flux<ByteBufferRecord>>> xRevRange(org.reactivestreams.Publisher<ReactiveStreamCommands.RangeCommand> commands) - Parameters:
commands
- must not be null.- Returns:
Flux
emitting the members of the stream in reverse.- See Also:
-
xTrim
Trims the stream tocount
elements.- Parameters:
key
- the stream key.count
- length of the stream.- Returns:
Mono
emitting the number of removed entries.- See Also:
-
xTrim
default reactor.core.publisher.Mono<Long> xTrim(ByteBuffer key, long count, boolean approximateTrimming) Trims the stream tocount
elements.- Parameters:
key
- the stream key.count
- length of the stream.approximateTrimming
- the trimming must be performed in a approximated way in order to maximize performances.- Returns:
Mono
emitting the number of removed entries.- Since:
- 2.4
- See Also:
-
xTrim
reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> xTrim(org.reactivestreams.Publisher<ReactiveStreamCommands.TrimCommand> commands) Trims the stream tocount
elements.- Parameters:
commands
- must not be null.- Returns:
Flux
emitting the number of removed entries perReactiveStreamCommands.TrimCommand
.- See Also:
-