Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

需要使用大量的Queue怎么处理 #2028

Closed
zhou-hao opened this Issue Apr 4, 2019 · 4 comments

Comments

2 participants
@zhou-hao
Copy link

zhou-hao commented Apr 4, 2019

业务中可能需要创建大量的队列,测试发现队列数量和ConnectionPoolSize 成正比,还有什么其他玩法么。

@jackygurui

This comment has been minimized.

Copy link
Member

jackygurui commented Apr 4, 2019

队列数量跟ConnectionPoolSize没有直接关系。ConnectionPoolSize跟并发量有关。

@zhou-hao

This comment has been minimized.

Copy link
Author

zhou-hao commented Apr 5, 2019

BlockQueue会占用连接数的吧? 如果我要响应式的消费queue,应该怎么用。现在用的RedissonBlockingQueueRx

@jackygurui

This comment has been minimized.

Copy link
Member

jackygurui commented Apr 6, 2019

创建BlockingQueue不会占用连接数,消费的时候才需要。如果条件允许的话,当需要消费多个队列的时候,可以采用pollFromAnyAsync来实现。

@zhou-hao

This comment has been minimized.

Copy link
Author

zhou-hao commented Apr 7, 2019

之前用的take,所以queue数量多了后连接数也增多。后来改成通过topic通知再poll queue和和定时poll()的方式。

@zhou-hao zhou-hao closed this Apr 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.