Skip to content

Feature request: XREAD support for reading last message from stream #7388

@majklik

Description

@majklik

Hello,

I lack a possibility to read from stream with XREAD starting with the last available message. It is possible read from concrete ID (or all with ID=0) or wait for new message (with special ID $).
But for our usage will be nice have to have possibility start with last message from stream, for example with special ID +:
XREAD BLOCK 10000 STREAMS stramA streamB streamC + + +

If I need start from last message then now I must use firstly:
XREVRANGE streamA + - COUNT 1
XREVRANGE streamB + - COUNT 1
...
XREVRANGE streamX + - COUNT 1
and then I can continue in loop with:
XREAD BLOCK 10000 STREAMS stramA streamB ... streamX idA idB ... idX

Thanks

Metadata

Metadata

Assignees

Labels

class:featurestate:needs-designthe solution is not obvious and some effort should be made to design it

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions