Community
Participate
Working Groups
A client may perform requests to the same address at a rate faster than what the server can respond. In this case, HttpDestination queues the requests in a unbounded queue, so the client has no idea that it is producing requests at a too fast rate. Increasing the number of connections may be a solution, but often this parameter is limited to save resources. We need a mechanism where we can limit the HttpDestination queue and reject the new requests that overflows the queue, so the client can handle the situation and eventually slow down the request rate.
Added method HttpClient.setMaxQueueSizePerAddress(int), and HttpDestination.setMaxQueueSize(int), and throwing RejectedExecutionException in case the queue limit is reached.