Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 7495 invoked from network); 29 Sep 2006 13:05:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2006 13:05:57 -0000 Received: (qmail 84239 invoked by uid 500); 29 Sep 2006 13:05:56 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 84227 invoked by uid 500); 29 Sep 2006 13:05:56 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 84218 invoked by uid 99); 29 Sep 2006 13:05:56 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2006 06:05:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [72.21.53.35] ([72.21.53.35:42540] helo=talk.nabble.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id AA/82-13110-33A1D154 for ; Fri, 29 Sep 2006 06:05:55 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GTI3s-0000io-UT for activemq-users@geronimo.apache.org; Fri, 29 Sep 2006 06:05:52 -0700 Message-ID: <6564622.post@talk.nabble.com> Date: Fri, 29 Sep 2006 06:05:52 -0700 (PDT) From: Andy Piper To: activemq-users@geronimo.apache.org Subject: Re: Trouble with Store and Forward In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: andyp@bea.com References: <6544577.post@talk.nabble.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Its 4.0. We can probably cook up a reprodcuer if you thik it sounds like a bug. andy James.Strachan wrote: > > BTW any idea the exact version of AMQ4? There's been a few in the last > year or so :). > > You don't happen to have a little test case that demonstrates the > problem do you by any chance? > > On 9/28/06, Andy Piper wrote: >> >> Hello, we are having some problems with store-and-forward in specific >> scenarios. >> >> The consumer is setup like this: >> >> try { >> BrokerService broker = new BrokerService(); >> // set persistence >> broker.setUseJmx(true); >> broker.addConnector("tcp:localhost:61616"); // Admin side listening >> port >> } catch (Exception ex) { >> // ... >> } >> >> the producer like this: >> >> try { >> BorkerService borker = new BrokerService(); >> // set persistence >> broker.addConnector("tcp:localhost:61615"); // Managed side >> listenning >> port, or we can >> // use vm transport if in >> same VM. >> DiscoveryNetworkConnector nc = new DiscoveryNetworkConnector(); >> nc.setUri(new URI("static:(tcp://localhost:61616)")); >> nc.setFailover(true); >> nc.addStaticallyIncludedDestination(new >> ActiveMQQueue("QUEUE.DEFAULT")); >> // Forward specified Queue >> broker.addNetworkConnector(nc); >> broker.start(); >> } catch (Exception ex) { >> // ... >> } >> >> and we send messages like this: >> >> // user = ActiveMQConnection.DEFAULT_USER; >> // pwd = ActiveMQConnection.DEFAULT_PASSWORD; >> // url = failover:tcp://localhost:61615 >> ActiveMQConnectionFactory connectionFactory = new >> ActiveMQConnectionFactory(user, pwd, url); >> Connection connection = connectionFactory.createConnection(); >> connection.start(); >> Session session = connection.createSession(false, >> Session.AUTO_ACKNOWLEDGE); >> Destination destination = session.createQueue("QUEUE.DEFAULT"); >> MessageProducer producer = session.createProducer(destination); >> producer.setDeliveryMode(DeliveryMode.PERSISTENT); // Persistent >> TextMessage tm = >> session.createTextMessage("jms-domain-log-prototype-embedded"); >> producer.send(tm); >> session.close(); >> connection.close(); >> >> This works well if we stop and start the producer. However if we stop and >> start the consumer it fails to reconnect - we end up having to stop and >> start the producer as well. >> >> We also tried using the JMS-JMS bridge like this: >> >> // Insert following codes before broker start. >> ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); >> factory.setBrokerURL("failover:tcp://localhost:61616"); >> OutboundQueueBridge oqb = new OutboundQueueBridge(); >> oqb.setOutboundQueueName("QUEUE.DEFAULT"); >> JmsQueueConnector jc = new JmsQueueConnector(); >> jc.setOutboundQueueBridges(new OutboundQueueBridge[]{oqb}); >> jc.setOutboundQueueConnectionFactory(factory); >> broker.addJmsConnector(jc); >> >> but this has the unfortunate side effect of needing the consumer to be >> started first. >> >> Any thoughts appreciated. >> >> I believe this is AMQ 4 >> >> andy >> -- >> View this message in context: >> http://www.nabble.com/Trouble-with-Store-and-Forward-tf2350313.html#a6544577 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/Trouble-with-Store-and-Forward-tf2350313.html#a6564622 Sent from the ActiveMQ - User mailing list archive at Nabble.com.