Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63A2C178A1 for ; Tue, 28 Jul 2015 13:14:50 +0000 (UTC) Received: (qmail 60635 invoked by uid 500); 28 Jul 2015 13:14:49 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 60588 invoked by uid 500); 28 Jul 2015 13:14:49 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 60575 invoked by uid 99); 28 Jul 2015 13:14:49 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2015 13:14:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 09CC71A7ACB for ; Tue, 28 Jul 2015 13:14:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.129 X-Spam-Level: *** X-Spam-Status: No, score=3.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5veF1MEtM5RU for ; Tue, 28 Jul 2015 13:14:47 +0000 (UTC) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id F2839203A3 for ; Tue, 28 Jul 2015 13:14:46 +0000 (UTC) Received: by wibxm9 with SMTP id xm9so160209899wib.1 for ; Tue, 28 Jul 2015 06:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=in7cn6Q3m2vSHo28IKPtRfHQ/zGzgROLT0+UMyA5LFE=; b=pVm4sEofPGNH7/K5C8SxHOe/4ukVX5daZDlldAD8l2Pml68mri6+h+F1kPGIYVDmVE RjRQIM4cbQzYTKSDxROJTXhyJTWWtKBVqhl//NQjj7aF7uXCUM0ZCJG/V/QDgBdnIX/j BzII/BTRhZLpZT0ZzzY038D1vKQRYvA+2n1/soDQSij4RSXUUQljs6ezqK6v1tCZkM9K TpJA/1ieMqfzPNTvI0Q7cRT+As0etq9RC9UsEV3LQlqqIJuahmInhWrIDH/pHD3m33sg vmFAaLA1SwMRm94UcnBy4Yk30RUJG/AKprQW6dODrcgQTClnCNCaUCW7osWSLIRj/7Mb Dgcg== MIME-Version: 1.0 X-Received: by 10.181.13.241 with SMTP id fb17mr35935251wid.13.1438089286462; Tue, 28 Jul 2015 06:14:46 -0700 (PDT) Received: by 10.28.23.75 with HTTP; Tue, 28 Jul 2015 06:14:46 -0700 (PDT) In-Reply-To: <1438085742.11806.2.camel@apache.org> References: <1438082703.11806.1.camel@apache.org> <1438085742.11806.2.camel@apache.org> Date: Tue, 28 Jul 2015 18:44:46 +0530 Message-ID: Subject: Re: http async client retry logic From: Shushant Arora To: HttpClient User Discussion Content-Type: multipart/alternative; boundary=f46d042182ad1337bf051bef4139 --f46d042182ad1337bf051bef4139 Content-Type: text/plain; charset=UTF-8 Thanks! One more doubt- I am using PoolingNHttpClientConnectionManager for managing connection pool of fixed size. At each call back reponse of HttpGet Request shall I call request.releaseConnection() inside FutureCallback to release connection back to pool or will it be taken back automatically ? On Tue, Jul 28, 2015 at 5:45 PM, Oleg Kalnichevski wrote: > On Tue, 2015-07-28 at 17:42 +0530, Shushant Arora wrote: > > Thanks. > > > > Can you explain how many threads are used for callbacks when I print > thread > > name in callbacks . It prints I/O dispatcher 2 (1 to 8) for completed > > and namepool-1-thread-1 for failed callbacks . Does it internally use 8 > > threads for handling callbacks or is it dynamic based on some calculation > > and can be overriden? > > > > HttpAsyncClient is based on HttpCore NIO. This should give an intro into > the underlying NIO framework. > > http://hc.apache.org/httpcomponents-core-ga/tutorial/html/nio.html#d5e477 > > Oleg > > > On Tue, Jul 28, 2015 at 4:55 PM, Oleg Kalnichevski > wrote: > > > > > On Tue, 2015-07-28 at 16:54 +0530, Shushant Arora wrote: > > > > Hi > > > > > > > > I am using org.apache.http.impl.nio.client.CloseableHttpAsyncClient > > > > (httpasyncclient-4.1.jar). > > > > > > > > In callbackof httpGet Request i.e FutureCallback there > are > > > 3 > > > > methods but no way to get the request context for which reponse came. > > > > > > > > How can I get the request url of this reponse or some identifier to > retry > > > > the request? > > > > > > > > Thanks > > > > > > > > > Nothing stops you from passing whatever context your callback requires > > > at construction time. > > > > > > Oleg > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > > > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > --f46d042182ad1337bf051bef4139--