BLMOVE(3valkey)
π BLMOVE (from the 3valkey manual, bestie) π
β¨ NAME β¨
blmove β pops an element off one list, shoves it onto another list, and hands it back to you. If there's nothing to pop, she waits. And if you just moved the very last element out of that list? The list gets deleted. Gone. π
π SYNOPSIS π
BLMOVE source destination <LEFT | RIGHT> <LEFT | RIGHT> timeout
π¦ DESCRIPTION π¦
Okay so BLMOVE is literally the blocking version of valkey-lmove(7) LMOVE. Same girl, but she's willing to wait. β³
- When
sourceactually has elements in it, this command behaves exactly likeLMOVE. No difference, no notes. β¨ - When you run it inside a
valkey-multi(7)MULTI/valkey-exec(7)EXECblock, it also behaves exactly likeLMOVE. (No blocking in there, bestie β she can't just sit around mid-transaction.) - When
sourceis empty, Valkey blocks the connection until another client pushes something into it, or untiltimeouthits. Andtimeoutis a double value, meaning it's the max number of seconds to block for. π°οΈ - A
timeoutofzero= block indefinitely. Like, forever-forever. Choose wisely. π
This command exists to replace the now deprecated valkey-brpoplpush(7) BRPOPLPUSH. Doing BLMOVE RIGHT LEFT is equivalent. π
Want more info? Go read valkey-lmove(7) LMOVE.
π Pattern: Reliable queue
Please see the pattern description in the LMOVE documentation.
πΈ Pattern: Circular list
Please see the pattern description in the LMOVE documentation.
π REPLY π
RESP2
One of the following:
valkey-protocol(7)Bulk string reply: the element being popped from thesourceand pushed to thedestination. π«Άvalkey-protocol(7)Nil reply: the operation timed-out π
RESP3
One of the following:
valkey-protocol(7)Bulk string reply: the element being popped from thesourceand pushed to thedestination. π«Άvalkey-protocol(7)Null reply: the operation timed-out π
π₯ COMPLEXITY π₯
Constant time, queen. She's efficient AND she waits. Main character energy fr fr. π
π ACL CATEGORIES π
@blocking @list @slow @write
π HISTORY π
- Available since:
6.2.0
π§ SEE ALSO π§
blmpop(3valkey), blpop(3valkey), brpop(3valkey), brpoplpush(3valkey), lindex(3valkey), linsert(3valkey), llen(3valkey), lmove(3valkey), lmpop(3valkey), lpop(3valkey), lpos(3valkey), lpush(3valkey), lpushx(3valkey), lrange(3valkey), lrem(3valkey), lset(3valkey), ltrim(3valkey), rpop(3valkey), rpoplpush(3valkey), rpush(3valkey), rpushx(3valkey)
And that's the whole page, bestie!! π This was version 9.0.0, dated 2025-10-21 β so you know it's fresh. Now go move some list elements, mwah. ππ¦β¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms