Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 7BEB765D4 for ; Thu, 30 Jun 2011 14:28:35 +0000 (UTC) Received: (qmail 71066 invoked by uid 500); 30 Jun 2011 14:28:35 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 71008 invoked by uid 500); 30 Jun 2011 14:28:34 -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 70996 invoked by uid 99); 30 Jun 2011 14:28:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2011 14:28:34 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qy0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2011 14:28:30 +0000 Received: by qyk27 with SMTP id 27so1535679qyk.2 for ; Thu, 30 Jun 2011 07:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=LH7kDqAK8n74Qg5iHn1TGus1O2Pqh2EfMrCvtWqYzpw=; b=iphTPKJUPy16I1qhZRta4JXFjBkv6PuPYSc6VQOxKGZgYBs3g6FeObFrzIlNL4/V+3 NteNfMIkw65sLx22+M5IRD75XVVBLJBj6IAXEsA71ipqwWxz4GhO2/1O+XBqfiq0pUpL ZzA+ayBjQZuAeY0+96RacfFFAZMx2nQ0o62zU= MIME-Version: 1.0 Received: by 10.229.7.212 with SMTP id e20mr1564230qce.192.1309444088515; Thu, 30 Jun 2011 07:28:08 -0700 (PDT) Received: by 10.229.211.207 with HTTP; Thu, 30 Jun 2011 07:28:08 -0700 (PDT) In-Reply-To: <1309442973005-3635766.post@n4.nabble.com> References: <4DF0F7E6.1010201@nwea.org> <1308826252636-3619470.post@n4.nabble.com> <1309442973005-3635766.post@n4.nabble.com> Date: Thu, 30 Jun 2011 15:28:08 +0100 Message-ID: Subject: Re: Durable subscriptions not surviving network disconnect From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 There is a transport listener interface that can give you indications of reconnects. see: org.apache.activemq.ActiveMQConnection#addTransportListener For a unit test, have a look at: org.apache.activemq.usecases.BrokerQueueNetworkWithDisconnectTest this uses a socket proxy to simulate a network failure between networked brokers. A simple network test with durable subs is: org.apache.activemq.network.SimpleNetworkTest#testDurableStoreAndForward you may need a combination of the two. On 30 June 2011 15:09, Andreas Calvo wrote: > Sorry for the late response. > > There is already a Jira issue > (https://issues.apache.org/jira/browse/AMQ-3353). > While I do know how to reproduce it using multicast brokers and producer and > consumer from the example directory, I do not know how to make a junit case. > If it's not difficult, I could try to do it. > > In the meantime, how can I capture when a client receives a disconnect from > the broker and restarts the connection? > I'm trying with advisory messages or execeptions in an embedded broker, > without succeed. > Any example of code that I could look at? > > thanks > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Durable-subscriptions-not-surviving-network-disconnect-tp3586149p3635766.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- http://fusesource.com http://blog.garytully.com