On Tue, 2015-07-28 at 19:06 +0530, Shushant Arora wrote:
> Does this problem comes in PoolingNHttpClientConnectionManager also or
> pooling manager handles this automatically without user being rethrow the
> exception from failed callback method of
> FutureCallback .
>
> And is it safe to retry the request from failed callback .
> some sort of
>
> future = httpclient.execute(request1,new
> AsyncHttpCallbackHandler(closeableHttpAsyncClient,request, currentRetry,
> maxRetry));
>
> class AsyncHttpCallbackHandler implements FutureCallback<HttpResponse>{
>
> public void failed(Exception ex) {
> //retry check and retry the request
> closeableHttpAsyncClient.execute(request,this);
> }
> }
>
It might be safe but would rather avoid doing that. I would probably use
a queue for all outgoing request and would re-introduce failed request
back to the queue for re-execution.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]