YouTip LogoYouTip

Lists Brpoplpush

# Redis BRPOPLPUSH Command [!(#) Redis Lists](#) The Redis BRPOPLPUSH command retrieves the last element from a list and pushes it to the head of another list. If the list is empty, it blocks until an element becomes available or the timeout expires. ### Syntax The basic syntax for the Redis BRPOPLPUSH command is as follows: redis 127.0.0.1:6379> BRPOPLPUSH LIST1 ANOTHER_LIST TIMEOUT ### Available Versions >= 2.0.0 ### Return Value If no elements are popped within the specified time, it returns nil along with the remaining wait time. Otherwise, it returns a list containing two elements: the value of the popped element and the wait time. ### Example # Non-empty List redis> BRPOPLPUSH msg reciver 500"hello moto" # Popped Element Value (3.38s) # Wait Time redis> LLEN reciver (integer) 1 redis> LRANGE reciver 0 01) "hello moto"# Empty List redis> BRPOPLPUSH msg reciver 1(nil)(1.34s) [!(#) Redis Lists](#) AI is thinking... [](#)(#) (#)[](#) [Byte Ark Coding Plan supports mainstream large models such as Doubao, GLM, DeepSeek, Kimi, MiniMax, etc., offering official direct supply that is stable and reliable. Configuration Guide Β₯9.9/month Activate Now](https://www.volcengine.com/activity/codingplan?utm_campaign=hw&utm_content=hw&utm_medium
← Lists LindexHashes Hvals β†’