Skip to content

Conversation

@anujphadke
Copy link

Usage -

  1. blpop key [key...] timeout
  2. brpop key [key...] timeout

E.g. -

  1. blpop:
    127.0.1.1:8102> LPUSH test_list how
    (integer) 1
    127.0.1.1:8102> LPUSH test_list are
    (integer) 2
    127.0.1.1:8102> LPUSH test_list you
    (integer) 3
    127.0.1.1:8102> blpop test_list 1
  1. "test_list"
  2. "you"
    127.0.1.1:8102> blpop test_list 1
  3. "test_list"
  4. "are"
    127.0.1.1:8102> blpop test_list 1
  5. "test_list"
  6. "how"
    127.0.1.1:8102> blpop test_list 1
  1. brpop :
    127.0.1.1:8102> LPUSH test_list how
    (integer) 1
    127.0.1.1:8102> LPUSH test_list are
    (integer) 2
    127.0.1.1:8102> LPUSH test_list you
    (integer) 3
    127.0.1.1:8102> brpop test_list 1
  1. "test_list"
  2. "how"
    127.0.1.1:8102> brpop test_list 1
  3. "test_list"
  4. "are"
    127.0.1.1:8102> brpop test_list 1
  5. "test_list"
  6. "you"

anujphadke and others added 2 commits August 5, 2020 16:09
Usage -
1. blpop key [key...] timeout
2. brpop key [key...] timeout

E.g. -

1. blpop:
127.0.1.1:8102> LPUSH test_list how
(integer) 1
127.0.1.1:8102> LPUSH test_list are
(integer) 2
127.0.1.1:8102> LPUSH test_list you
(integer) 3
127.0.1.1:8102> blpop test_list 1
1) "test_list"
2) "you"
127.0.1.1:8102> blpop test_list 1
1) "test_list"
2) "are"
127.0.1.1:8102> blpop test_list 1
1) "test_list"
2) "how"
127.0.1.1:8102> blpop test_list 1

2. brpop :
127.0.1.1:8102> LPUSH test_list how
(integer) 1
127.0.1.1:8102> LPUSH test_list are
(integer) 2
127.0.1.1:8102> LPUSH test_list you
(integer) 3
127.0.1.1:8102> brpop test_list 1
1) "test_list"
2) "how"
127.0.1.1:8102> brpop test_list 1
1) "test_list"
2) "are"
127.0.1.1:8102> brpop test_list 1
1) "test_list"
2) "you"
@w4096
Copy link

w4096 commented May 17, 2021

blpop may block the connection between proxy and Redis, and the connection was reused by many client. This implementation can not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants