Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 58208 invoked from network); 8 Sep 2008 19:50:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Sep 2008 19:50:01 -0000 Received: (qmail 76456 invoked by uid 500); 8 Sep 2008 19:49:58 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 76433 invoked by uid 500); 8 Sep 2008 19:49:58 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 76421 invoked by uid 99); 8 Sep 2008 19:49:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 12:49:57 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of e.semog@gmail.com designates 64.233.166.179 as permitted sender) Received: from [64.233.166.179] (HELO py-out-1112.google.com) (64.233.166.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 19:48:59 +0000 Received: by py-out-1112.google.com with SMTP id f47so1147379pye.6 for ; Mon, 08 Sep 2008 12:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=XELDZkG11Qr65RFVmeSYpZUz6p/72NtEDqOTy98LVwk=; b=q06zIdy840ocFTDA2GMDlFjfoMUcSt2G8FUtD9osOflZokZUmVZ6YNDieQrmLYL59/ usT0QiCHLeEVcr5k55obJg2BQuPR/CnDiXJ42uDquXxh/RSTrtZj83wON+RN7Yh8gzVi GqvlcQAZFMWRu0Wy8imTzgR5xXF8cYBMKDkC0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=t9PBGH8HbE0fzggiwhiUjrDiTi7AD5Xs9nFIs77HL3gc1LmEBbWMOT8iK9dN4CHAwe IMm6o1yUwVoUa4R9maVcWdwraxxNOWOKaCB42wJzkGoL3yCeSj1f6rqfSZJo59koi13x VFRrTNNpPNFiEy1GahDwNTMIkLZGky0UHa6Ow= Received: by 10.141.136.19 with SMTP id o19mr9085037rvn.281.1220903353362; Mon, 08 Sep 2008 12:49:13 -0700 (PDT) Received: by 10.140.163.16 with HTTP; Mon, 8 Sep 2008 12:49:13 -0700 (PDT) Message-ID: <5a56ce1b0809081249u30fbf4b7l12ef50444d49bbf0@mail.gmail.com> Date: Mon, 8 Sep 2008 12:49:13 -0700 From: "Jim Gomes" To: users@activemq.apache.org Subject: Re: ActiveMQ+NMS+TCP Connection Problems In-Reply-To: <7fd310d10809041546h19a21fe4ldb8862bdcf862564@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_75440_13570383.1220903353360" References: <7fd310d10809041546h19a21fe4ldb8862bdcf862564@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_75440_13570383.1220903353360 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Bryan, I can't answer all of your questions, yet. But I can answer some of them, anyway. 1. As far as the ResponseTimeout property goes, that is used for network timeouts. It's not a JMS timeout value like TimeToLive. The ResponseTimeout is used by the client to wait for a response from the broker. Since a network call is inherently a blocking operation (send request, wait for response), if we never receive a response from a dead/hung broker, the client will hang as well. The ResponseTimeout lets client abort waiting for the response from the broker. This can be set to whatever performance constraints your application requires. In a WAN environment, this might be set to something fairly high where there is a lot of latency in network round-trips. The socket connection is not dropped. The client simply stops waiting for the broker to respond and goes into its error-handling code for a non-response. 2. I see the marshalling code for the KeepAliveInfo, but like you I don't see how this is turned on or controlled from the client-side. This would need more investigation to see if it is enabled via a URI parameter, or if new code needs to be written to enable its use. 3. Can't answer the server-side socket issue. Don't know that code. On Thu, Sep 4, 2008 at 3:46 PM, Bryan Murphy wrote: > Hey Guys, > We're still having problems consuming messages from an ActiveMQ service via > Apache.NMS. We've fixed a few bugs in the past week, and we're left with > one outstanding issue where we have one of our consumers in a different > data-center than the message server. It appears as if our TCP connections > are timing out while the system is idle (possibly due to NAT translation > timeouts) and we're never properly re-establishing connections back to the > message server. > > I've dug around in the in the NMS code a bit, and I have a few questions. > > 1. TcpTransport, Connection, and Session have a property called > "RequestTimeout". I'm not entirely clear on what this property dose. What > times out, and what is a "request"? What happens when one of these > requests timeout? Is the socket dropped and re-opened? > > 2. It does not appear that there is any way to turn KeepAlive on via the > NMS > client, but I do see code for handling keep alive packets. The > documentation here > http://activemq.apache.org/tcp-transport-reference.htmlseems to imply > that this is a client side option, but I was wondering if we > could configure it in the server side and how could we verify that it was > in > fact running? > > 3. If a client reconnects to the server, does the server forcefully close > the old socket? I'm not sure this is happening, but it seems like a > logical > thing to do and I was curious what the expected behavior is. > > Any other suggestions how we can deal with this? This channel is > high-latency, but very low messages, so we don't mind if it takes awhile to > handle these messages, we just need it to happen. > > Thanks, > Bryan > ------=_Part_75440_13570383.1220903353360--