From users-return-15312-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Tue Aug 05 15:11:41 2008 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 99279 invoked from network); 5 Aug 2008 15:11:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Aug 2008 15:11:41 -0000 Received: (qmail 10188 invoked by uid 500); 5 Aug 2008 15:11:39 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 10168 invoked by uid 500); 5 Aug 2008 15:11:39 -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 10157 invoked by uid 99); 5 Aug 2008 15:11:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 08:11:39 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 15:10:42 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KQOBo-0003Ov-NP for users@activemq.apache.org; Tue, 05 Aug 2008 08:11:08 -0700 Message-ID: <18833203.post@talk.nabble.com> Date: Tue, 5 Aug 2008 08:11:08 -0700 (PDT) From: Allen Teng To: users@activemq.apache.org Subject: can not consume messages on broker network. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ssxxue@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello All i'v encountered strange problem on message consuming on broker network . i have 2 computers M1 and M2 each with an embedded broker on it . assume B1 on M1 and B2 on M2, and each of the broker has a queue with same queue name(test-queue). B2 has configuring a network of brokers with duplex . (... ... ) B1 has no configration of network connectors . B1 is config to integrate with jboss by activemq-ra and B2 is a simple broker in vm . Producer(P) connect to B1 and Consumer(C) connect to B2. i write a test to send out 1000 messages by P , and according to the log of C , all the messages are received . but when i restart C , C will receive those messages again . i try to monitor the test-queue on B1 by hermes-jms and found that all the messages in test-queue on B1 never be removed . when C is startup to consume messages , messages act just like be "copy to" test-queue on B2 and these messages on test-queue(B2) will be removed after they are consumed , but nothing happens to the messages on test-queue(B1). in activemq's document , i found that " A Store and Forward Network of Brokers means the messages travel from broker to broker until they reach a consumer; with each message being owned by a single broker at any point in time." , so the message cant be in both test-queue on B1 and B2 . but this is exactlly not what i see . i dont know whether it is a configration problem or anything else . could someone shed any light on it ? i appreciated very much for any help . my environment and codes/configurations : M1 : windows xp , jdk1.6.0_03 , jboss-4.2.2.GA , activemq-5.0.0 , activemq-ra-5.0 , spring2.5 some configuration for B1 ( i only post those part which i'v changed it ) : 1) ra.xml in activemq-ra.rar\META-INF .... .... ... ServerUrl .... vm://localhost .... .... BrokerXmlConfig .... xbean:broker-config.xml .... 2) broker-config.xml in activemq-ra.rar .... .... .... .... 3) activemq-jms-ds.xml in my jboss configuration ( %jboss_home%/server/default/deploy) .... .... activemq/QueueConnectionFactory .... tcp://localhost:61616 .... .... 4) spring config for producer .... .... 5) code for producer http://www.nabble.com/file/p18833203/DefaultSender.java DefaultSender.java 6) code for send messages ... DefaultSender sender = (DefaultSender)context.getBean("sender"); int idx = 0; while (idx < SimpleMessageHelper.payloads.size()) { sender.sendMessage(SimpleMessageHelper.genSimpleMessage(idx++)); } ... M2 : windows xp , jdk1.6.0_01 , activemq-5.0.0 ,spring2.5 1) spring config for consumer http://www.nabble.com/file/p18833203/spring_consumer.xml spring_consumer.xml 2) code for consumer http://www.nabble.com/file/p18833203/DefaultListener.java DefaultListener.java Code for helper class used in both side of B1 and B2 http://www.nabble.com/file/p18833203/SimpleMessageHelper.java SimpleMessageHelper.java http://www.nabble.com/file/p18833203/SimpleConverter.java SimpleConverter.java http://www.nabble.com/file/p18833203/SimpleMessage.java SimpleMessage.java http://www.nabble.com/file/p18833203/spring_consumer.xml spring_consumer.xml One of messages which left in test-queue(B1) , i copy it from ui of herme-jms ActiveMQTextMessage {commandId = 5, responseRequired = true, messageId = ID:erry-al-4741-1217940624875-3:0:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:erry-al-4741-1217940624875-3:0:1:1, destination = queue://test-in, transactionId = null, expiration = 0, timestamp = 1217940649078, arrival = 0, brokerInTime = 1217940649093, brokerOutTime = 1217944061875, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 18, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = .... } -- View this message in context: http://www.nabble.com/can-not-consume-messages-on-broker-network.-tp18833203p18833203.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.