set cursor
This block is part of the data group and was last modified in core v15.0.2.
set cursor v15.0.2 Moves a member's cursor on a key forward to a sequence: the last order a worker processed in a queue, a sync client's position, a reader's last-read message in a channel.
- flow
- group
valuerequiredthe set of keys the cursors are for: a shop's order queues, a server's channels
- member
valuewhose cursors: a worker, a device, a user. The run's socket's user by default
- key
valuerequiredthe key the cursor is on: a queue, a feed, a channel
- seq
numberrequiredthe sequence reached, such as an entry's seq from log_append or log_head
- flow
- moved
condition - previous
number - current
number - error
value
Forward only, in one Redis call: a set below the current cursor (a stale acknowledgement re-sent after a reconnect) changes nothing, and a sequence in the future is clamped to now (sequences are millisecond stamps, as the log_* blocks give them). moved says whether it moved; previous and current are the cursor before and after. A member's cursors in a group live 90 days after their last set. key is required (KEY_REQUIRED). member defaults to the run's socket's user; GROUP_REQUIRED or MEMBER_REQUIRED on error when either is empty, CURSOR_NOT_ENABLED when the node runs no cursors.
Version history
Introduced in v15.0.2.
v15.0.2: block added in this release.
Back to
data Return to the main group to view all sub-groups Back to cursors Return to the group to view all blocks within this group