Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 52346 invoked from network); 3 Dec 2010 15:42:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Dec 2010 15:42:01 -0000 Received: (qmail 25653 invoked by uid 500); 3 Dec 2010 15:42:01 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 25577 invoked by uid 500); 3 Dec 2010 15:42:00 -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 25569 invoked by uid 99); 3 Dec 2010 15:42:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 15:42:00 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tabish121@gmail.com designates 209.85.161.195 as permitted sender) Received: from [209.85.161.195] (HELO mail-gx0-f195.google.com) (209.85.161.195) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 15:41:53 +0000 Received: by gxk6 with SMTP id 6so2605481gxk.2 for ; Fri, 03 Dec 2010 07:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=UHqU06/YHupOv0EesGvUHfBQAfGr/3DC+tu+60Q+iz4=; b=Z32CLcSS6cTj+jsUgfDIUxTtPTaRTMsByMEBPWG6eqUM++5OAFR15c0+9pE/Xf0Nfd fJ9vrytbJnaJrK0VkWZ/oTaEH2SZo+GfSEoibh9ZFhDKm0mSV+GIN30TU6JpBnLu8CD9 CZ+x2slmAtks9huxFiqMyDZ1a0UObUqcBLJM8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=YF6OpOCD25oLWcAcAz3QyUDJWfZYh22iZrWqxfOImiGgrkfl4rHYJftXihr9pM+XDL Ci0DJ0JK5CumnQCF+ul4yWIy7ZvKALH4PWFVPW6y14vt2T0tse0cGTWxDk9YnEWcpWvG /rjt/pMsi0N4Cj0oBfjaE2DSx3M2AoU5xcwOA= MIME-Version: 1.0 Received: by 10.151.50.18 with SMTP id c18mr4006528ybk.0.1291390892228; Fri, 03 Dec 2010 07:41:32 -0800 (PST) Received: by 10.236.105.166 with HTTP; Fri, 3 Dec 2010 07:41:32 -0800 (PST) In-Reply-To: References: Date: Fri, 3 Dec 2010 10:41:32 -0500 Message-ID: Subject: Re: ACTIVEMQ-CPP. Topic consumer after connection interrupt and restore From: Timothy Bish To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=0015174c330665c2e40496835fbf X-Virus-Checked: Checked by ClamAV on apache.org --0015174c330665c2e40496835fbf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It sounds like you've run into a bug. We'd need to build a unit test case to try and reproduce it. There's an easier way to break the connection tha= n using a breakpoints. You can get the underlying transport from the connection instance by casting it to an ActiveMQConnection and then calling getTransport. From the transport you can then call narrow and use the typeid of the TcpTransport to get a pointer to the real TcpTransport that's connected to the broker and call close on it which breaks the connection an= d kicks in the Failover logic. You can take a look at some of the FailoverTest methods to see how this can be done. Regards Tim www.fusesource.com On Fri, Dec 3, 2010 at 8:06 AM, Oscar Pernas wrote: > Hi all, > > Sorry if I'am missunderstanding something but I have a activemq-cpp topic > consumer. I am trying to test connection interrupt and restores, and how > messages are sent to a durable topic. To do this, I've put a breakpoint i= n > my code after connect to broker. Some time later, I've press to continue > executing the program and I receive a connection interrupt and a connecti= on > restore like this: > > > - Created consumer, and received two messages: > > 2010-12-03 13:48:53 DEBUG (ActiveConsumer:202) - ActiveConsumer::run. > Consumer is started succesfully: 1 > 2010-12-03 13:48:53 INFO (ActiveManager:1076) - Started connection id 1 > succesfully. > Message received: 0 from connection 2FIPASO1111116E0 > Message received: 0 from connection 2FIPASO1111116E1 > > > Stopped by the breakpoint and received interrupt and restore: > > > 2010-12-03 14:00:27 DEBUG (ActiveConsumer:559) - > Producer::transportInterrupted. The Connection's Transport has been > interrupted.consumer1 > ERROR: Received on onConnectionInterrupted from 1 > 2010-12-03 14:00:27 DEBUG (ActiveConsumer:577) - > Producer::transportResumed. > The Connection's Transport has been Restored.consumer1 > ERROR: Received on onConnectionRestore from 1 > > > But after that, I can't receive any message by this topic, It could be a > bad > test making a breakpoint, but I'm trying to understand. Any clue? > > > regards > > > -- > =D3scar Pernas Plaza. > --0015174c330665c2e40496835fbf--