Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 50230 invoked from network); 28 Nov 2007 11:40:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 11:40:33 -0000 Received: (qmail 77985 invoked by uid 500); 28 Nov 2007 11:40:21 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 77955 invoked by uid 500); 28 Nov 2007 11:40:20 -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 77946 invoked by uid 99); 28 Nov 2007 11:40:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 03:40:20 -0800 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; Wed, 28 Nov 2007 11:40:00 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IxLGs-0003YO-SN for users@activemq.apache.org; Wed, 28 Nov 2007 03:40:02 -0800 Message-ID: <13990648.post@talk.nabble.com> Date: Wed, 28 Nov 2007 03:40:02 -0800 (PST) From: pfid To: users@activemq.apache.org Subject: CMS: message redelivery question / producer causing segmentation fault MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: pf@informationsdesign.de X-Virus-Checked: Checked by ClamAV on apache.org I'm having 2 problems with activemq-cpp-2.1.1 i just cant get rid off. hopefully someone can help me out :) the broker i'm using is v4.1.1. 1) how does message redelivery work with the activemq-cpp-2.1.1 api? according to http://activemq.apache.org/message-redelivery-and-dlq-handling.html i need to use commit(), rollback() or recover(). in my client app i'm using Session::CLIENT_ACKNOWLEDGE as well as DeliveryMode::PERSISTENT. in my client app i don't want to acknowledge any message i read, since this is supposed to be a check, only to see whats in the queue, and don't take it off the queue. so i 1) open the queue (as showed in the example code) and start reading 2) print messages to console 3) don't acknowledge any message 4) program ends all goes fine so far. but, however, when i try to do the same thing again, my client won't receive any message. i can restart the programas much as i want, it wont let me read the messages that are still in the queue. only when i send at least one more message to this queue (from any application), my app will read ALL messages (the previous received ones plus the additional "trigger"-message) again just fine. any more tries will again result in not receving any messages. i could not find the above mentioned method session::recover() (its not in Session.h), so i wonder how i could get the messages redelivered? note that the application will terminate when it finished reading (its just a queue-check program), thus all activemq objects will be rebuild/opened when i restart the application. 2) for this case i'm using the example code showed on the amq-cpp-2.1.1 website. i've only changed - use queues - name of the queue - add username/password to connectionfactory the broker is configured with a couple of queues like this: > configuration="activemq-domain"/> > > > > > queue="test_in" read="admin" write="testuser" admin="testuser,admin"/> > queue="test_out" read="testuser" write="admin" admin="testuser,admin"/> > > groups.properties: > admins=admin > testuser=testuser > > users.properties > admin=adminpwd > testuser=testpwd test 1: producer writes queue "test_in" with username "testuser" and appropriate password. works. test 2: consumer reads queue "test_in" with username "testuser" and appropriate password. Error: "User testuser is not authorized to read from: queue://test_in". This is fine. test 3: consumer reads queue "test_out" with username "testuser" and appropriate password. works. test 4: producer writes queue "test_out" with username "testuser" and appropriate password. Segmentation fault (core dumped). Backtrace: > #0 0x080e6d07 in > activemq::connector::openwire::OpenWireConnector::createProducer > (this=0x829ca78, destination=0x829c8c0, session=0x829cbd8) > at activemq/connector/openwire/OpenWireConnector.cpp:678 > 678 delete producerInfo; > #0 0x080e6d07 in > activemq::connector::openwire::OpenWireConnector::createProducer > (this=0x829ca78, destination=0x829c8c0, session=0x829cbd8) > at activemq/connector/openwire/OpenWireConnector.cpp:678 > #1 0x080a64c3 in activemq::core::ActiveMQSession::createProducer > (this=0x829c928, destination=0xb74b9678) at > activemq/core/ActiveMQSession.cpp:348 > Could someone help me please? -- View this message in context: http://www.nabble.com/CMS%3A-message-redelivery-question---producer-causing-segmentation-fault-tf4887950s2354.html#a13990648 Sent from the ActiveMQ - User mailing list archive at Nabble.com.