Lists Brpop
# Redis Brpop Command
[!(#) Redis Lists](#)
The Redis Brpop command removes and returns the last element of a list. If the list does not exist or is empty, it blocks the list until an element is available to pop or the timeout is reached.
### Syntax
The basic syntax for the Redis Brpop command is as follows:
redis 127.0.0.1:6379> BRPOP LIST1 LIST2 .. LISTN TIMEOUT
### Available Since
>= 2.0.0
### Return Value
If no element is popped within the specified time, it returns a nil and the wait duration. Otherwise, it returns a list containing two elements: the first element is the key from which the element was popped, and the second element is the value of the popped element.
### Example
redis> DEL list1 list2 (integer) 0 redis> RPUSH list1 a b c (integer) 3 redis> BRPOP list1 list2 01) "list1"2) "c"
[!(#) Redis Lists](#)
YouTip