开发者

HTTP request queue with worker pool

开发者 https://www.devze.com 2023-01-19 06:53 出处:网络
I\'m developing application in Java which connects to different web-servers via HTTP protocol (sends them request and waits for response). I开发者_如何转开发 would like to use pattern with queue and w

I'm developing application in Java which connects to different web-servers via HTTP protocol (sends them request and waits for response). I开发者_如何转开发 would like to use pattern with queue and worker pool, so I'd like to know if there any frameworks in Java providing methods for this?


I think what you're asking for is a threadpool. It has a queue of tasks and a number of threads working on those tasks. A little bit of googling for "java threadpool" landed me there, might be relevant. http://download.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool(int)

Threading can be messy if you aren't careful when designing, good luck :)


Try java queue service like onlinemq.com or SQS

0

精彩评论

暂无评论...
验证码 换一张
取 消