Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 37821 invoked from network); 30 Jun 2009 11:20:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jun 2009 11:20:35 -0000 Received: (qmail 31192 invoked by uid 500); 30 Jun 2009 11:20:45 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 31169 invoked by uid 500); 30 Jun 2009 11:20:45 -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 31159 invoked by uid 99); 30 Jun 2009 11:20:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 11:20:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 11:20:36 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MLbNo-0008Tq-6q for users@activemq.apache.org; Tue, 30 Jun 2009 04:20:16 -0700 Message-ID: <24270140.post@talk.nabble.com> Date: Tue, 30 Jun 2009 04:20:16 -0700 (PDT) From: Tim Sparg To: users@activemq.apache.org Subject: Monitoring activemq connection MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: timothy.sparg@corefreight.com X-Virus-Checked: Checked by ClamAV on apache.org hi all We have an application that receives a lot more messages than it sends. It sends an appropriate response to every message that it receives, but never initiates a 'conversation' (for lack of a better term) Our problem is that we have very poor lines between the applications that are running ActiveMQ, so the connection may go down completely, drop packets etc etc... What then happens is that the application initiating the conversation will send a message to the appropriate queue, and the receiving app never picks it up. I was looking at the TransportListener class, which looks quite promising with the onException,transportInterrupted() and transportResumed() methods, but when i pull out my network cable no error is thrown or methods entered. My presumption is that these will only be entered/thrown if the application is sending a message. I also tried getting the TransportChannel and then using the isConnected() method on there, but when i pull my network cable out the method still returns true. I'm currently thinking of making the application attempt a reconnection after a specified time of inactivity, thus if the connection is down/not functioning then an exception can be thrown and the problem managed from there. However this seems like a fairly shoddy solution, and i'm hoping that somebody is aware of a better way of checking that the connection is alive. thanks Tim -- View this message in context: http://www.nabble.com/Monitoring-activemq-connection-tp24270140p24270140.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.