java - thread wait for the connection to redis when use brpop/blpop
问题描述
Several threads are running with brpop involved, but it seems that each thread is waiting for another blocked thread's connection to redis(as the queue brpop operator on is mostly empty).
I use StringRedisTemplate
to connect and I want to know how can each thread using its own connection to redis and not affect each other.
解决方案
推荐阅读
- python - What exactly does '[:]' mean in the example of ipyparallel?
- matlab - 在matlab上的3d绘图中绘制一个点(4x1)矩阵
- c++ - 为什么引用会看到私人成员?
- mysql - 用户''@'localhost'的访问被拒绝(使用密码:YES)SQLState:28000 VendorError:1045:如何解决问题?
- node.js - 从同一个 Nodejs 进程中测量 Nodejs 进程的 CPU 使用率
- python - 在 Python 中为特定熊猫单元格赋值的问题
- mysql - 如何在不使用 docker-compose 的情况下在单个命令中使用 dump.sql 文件启动 mysql docker 容器
- url - 添加 url 参数以获得更多结果
- bash - 将 shell 或 bash 添加到 docker 映像(基于 Debian GNU/Linux 的 Distroless)
- r - 将 tbl 转换为 R 中多个数据集的数据帧