Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 43983 invoked from network); 29 Sep 2006 14:57:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2006 14:57:58 -0000 Received: (qmail 58057 invoked by uid 500); 29 Sep 2006 14:57:58 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 57924 invoked by uid 500); 29 Sep 2006 14:57:58 -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 57915 invoked by uid 99); 29 Sep 2006 14:57:57 -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 07:57:57 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=james.strachan@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [64.233.182.191] ([64.233.182.191:13539] helo=nf-out-0910.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 75/C5-13110-3743D154 for ; Fri, 29 Sep 2006 07:57:56 -0700 Received: by nf-out-0910.google.com with SMTP id n29so1035221nfc for ; Fri, 29 Sep 2006 07:57:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Zlu5z0yukFzeWrRZkWUJIv6grFwL/Q71tA1+cKpGjckMUieMY4oUTFj5r/zVC7NTlijaBaNwAQEIHIVVvcqLWPbBm6CJYiYkmXItZJ4bKn1w1nBzkIRdtttyA6Bo6zyk0zg98wQ/Z/J1BT8dAL7VSVwi9jCxKdZt8uFhbRcibI8= Received: by 10.78.200.20 with SMTP id x20mr2514162huf; Fri, 29 Sep 2006 07:57:51 -0700 (PDT) Received: by 10.78.146.12 with HTTP; Fri, 29 Sep 2006 07:57:46 -0700 (PDT) Message-ID: Date: Fri, 29 Sep 2006 15:57:46 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: Trouble with Store and Forward In-Reply-To: <6564622.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6544577.post@talk.nabble.com> <6564622.post@talk.nabble.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 9/29/06, Andy Piper wrote: > > Its 4.0. We can probably cook up a reprodcuer if you thik it sounds like a > bug. It might be worth trying to reproduce on 4.0.2 and if you can then yes if its not too much trouble please submit a test case and it sounds like it could be 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. > > -- James ------- http://radio.weblogs.com/0112098/