The former sounds good, but I have the following concerns:
- blocking hundreds of connections might be wasteful, e.g., io multiplexing strategy used, and
- the redis server should deal with more concurrent connections since each is long-running.
The alternative approach might be the latter:
- instead of busy waiting indefinitely, yield the thread at every
N-th iteration.
Note that the number of connections would increase in proportion to the number of instances. Outside the two, a fixed pool of BLPOP executors can be introduced, but that could easily be the bottleneck if some of the redis list is idle.