Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Preventing queuing of requests when all connections exhausted

On 2/6/2015 3:33 PM, Simone Bordet wrote:
I pushed a couple of changes that I think would allow you to obtain the behavior your want. Override HttpDestination.enqueue() and HttpDestination.newExchangeQueue(). Mind to try and report back if you can achieve what you want ?

Let me see if I've figured out what you're thinking:

I'd override HttpDestination.newExchangeQueue() to return an object that keeps an outstanding request count. That returned object would override Queue.offer() to fail if the count is too high, increment the count, and decorate the HttpExchange so that HttpExchange.getResponseListeners() returns an extra completion listener to decrement the count.

I don't see why it would be necessary to override HttpDestination.enqueue().



Back to the top