Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 96339 invoked from network); 1 May 2008 23:43:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 May 2008 23:43:34 -0000 Received: (qmail 5208 invoked by uid 500); 1 May 2008 23:43:35 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 5173 invoked by uid 500); 1 May 2008 23:43:35 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 5161 invoked by uid 99); 1 May 2008 23:43:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 16:43:35 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2008 23:42:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 92BE1234C116 for ; Thu, 1 May 2008 16:39:43 -0700 (PDT) Message-ID: <902682627.1209685183600.JavaMail.jira@brutus> Date: Thu, 1 May 2008 16:39:43 -0700 (PDT) From: "John Silva (JIRA)" To: dev@activemq.apache.org Subject: [jira] Issue Comment Edited: (AMQ-895) JMS to JMS Bridge never reconnects under remote broker restarts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42515#action_42515 ] jsilva edited comment on AMQ-895 at 5/1/08 4:39 PM: -------------------------------------------------------- the attached patch has a slight error while (maximumRetries > 0 && attempt >= maximumRetries); should be while (maximumRetries > 0 && attempt <= maximumRetries); correct? Even with this change, you can see the number of retries increment, but the producer does not begin sending. I have also tried the patch in the comments of AMQ-1220 and this actually does reconnect the bridge (no more connection failures) but the producer fails to send the messages which are enqueued during the time the foreign connection is down. The exception in 4.1.1 is: javax.jms.IllegalStateException: The producer is closed at org.apache.activemq.ActiveMQMessageProducer.checkClosed(ActiveMQMessa geProducer.java:333) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu cer.java:445) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu cer.java:415) at org.apache.activemq.ActiveMQQueueSender.send(ActiveMQQueueSender.java :116) at org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.j ava:87) at org.apache.activemq.network.jms.DestinationBridge.onMessage(Destinati onBridge.java:134) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageC onsumer.java:854) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionE xecutor.java:99) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionEx ecutor.java:166) at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskR unner.java:101) at org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTa skRunner.java:25) at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRun ner.java:39) was (Author: jsilva): the attached patch has a slight error while (maximumRetries > 0 && attempt >= maximumRetries); should be while (maximumRetries > 0 && attempt <= maximumRetries); correct? Even with this change, you can see the number of retries increment, but the producer does not begin sending. I have also tried the patch in the comments of AMQ-1220 and this actually does reconnect the bridge (no more connection failures) but the producer fails to send the messages which are enqueued during the time the foreign connection is down. > JMS to JMS Bridge never reconnects under remote broker restarts. > ---------------------------------------------------------------- > > Key: AMQ-895 > URL: https://issues.apache.org/activemq/browse/AMQ-895 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 4.0 RC2, 4.0.1 > Reporter: Manuel Teira > Fix For: 5.2.0 > > Attachments: test_patch.diff > > > I'm using ActiveMQ (4.0.1) JMS to JMS Bridge functionality to connect to a SunMQ JMS Broker (3.6 SP3 (Build 02-A)). I'm using two queues, an input and an output one, with the following configuration: > > > > > > > > > > > The system works really well until the SunMQ broker needed to be restarted. This is what I found: > 1.-ActiveMQ is not aware of the remote broker shutdown. I waited for a while, but no log on ActiveMQ indicates knowledge about the new situation. > 2.-When I send a message to the output queue SUNRECV, ActiveMQ complains that the producer is closed: > [ERROR][2006/08/25.09:47:12.039][ActiveMQ Session Task]failed to forward message: ActiveMQTextMessage {commandId = 5, responseRequired = false, messageId = ID:trabucco-43457-1156491843149-3:4:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:trabucco-43457-1156491843149-3:4:1:1, destination = queue://SUNRECV, transactionId = null, expiration = 0, timestamp = 1156492032027, arrival = 0, correlationId = null, replyTo = null, persistent = false, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 2, properties = null, readOnlyProperties = true, readOnlyBody = true, text = 1}([C4064]: Cannot perform operation, producer is closed.) > After this, it is automatically queueing messages without sending them, showing the log: > [DEBUG][2006/08/25.09:47:42.721][RMI TCP Connection(4)-10.95.89.20]No subscriptions registered, will not dispatch message at this time. > Even if SunMQ is started again, ActiveMQ is not detecting the new situation, and continues queueing messages sent to SUNRECV. > Please, make me know if more information is needed to understand the situation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.