Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 96129 invoked from network); 31 Jan 2008 13:53:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2008 13:53:47 -0000 Received: (qmail 19867 invoked by uid 500); 31 Jan 2008 13:53:37 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 19850 invoked by uid 500); 31 Jan 2008 13:53:37 -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 19841 invoked by uid 99); 31 Jan 2008 13:53:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2008 05:53:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chubrilo@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2008 13:53:07 +0000 Received: by ug-out-1314.google.com with SMTP id k3so561850ugf.5 for ; Thu, 31 Jan 2008 05:53:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=yemSJIAdyHsk3cQS4JEll6YV0H1MgVHLz2vm7UUdTeI=; b=iDW7GDNqRYjucDv8Vg8P7fziyZWGjYqTHyJ7hp/e3lbDAn+kiHiVr+EvWG7ZvavY9UMkypxkZ544zMWzLD/PTsCxYqsHLSES8otEEr5hosoYPRYIv/vEYFwSOl2nqCJ02qlrxQLSKCQ+0w3XzeNypokKr4wB0C32kETdRalPqXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=bQhN7G2MIcvoEMOLfuFhwX+EXOLLDfkxZdjv2bdaHK/ttmFBRnYQAw0CVuY2fRRMRh8tAnDnSVS4It783GVDKOKdzY8cjzxkPgJ04v3GR0M08LdMA/2uekr1Vf5K7CbBGhlQ6+pczLS+0coTcWr5py557wT30Refm86SlvM2e2g= Received: by 10.67.115.19 with SMTP id s19mr4080396ugm.70.1201787592656; Thu, 31 Jan 2008 05:53:12 -0800 (PST) Received: by 10.67.21.6 with HTTP; Thu, 31 Jan 2008 05:53:12 -0800 (PST) Message-ID: <36e91d9d0801310553x15667c56n645bd07f749a35d7@mail.gmail.com> Date: Thu, 31 Jan 2008 14:53:12 +0100 From: "Dejan Bosanac" Sender: chubrilo@gmail.com To: users@activemq.apache.org Subject: Re: Is ActiveMQ the right tool? In-Reply-To: <47A1CB2D.5020504@tweakers.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15204017.post@talk.nabble.com> <47A1CB2D.5020504@tweakers.net> X-Google-Sender-Auth: efda7adff946b4ff X-Virus-Checked: Checked by ClamAV on apache.org Hi Maarten > > I'm running a cluster of webservers and I'd like to write certain events > > (logins, logouts, etc.) to a central log. To do that, I'd like the > > webservers to send event messages to a broker. A logging machine should > > periodically fetch, process, aggregate and write those events to a log. For pure logging purposes, I would personally use syslog over amq, but you can use amq as well. > > > 1) Building ActiveMQ with Maven takes forever. I cancelled it after ~2 hours > > of running unit tests and grabbed myself the binary. > I doubt there is any good reason to roll your own for a java-application > any way? Yes, there is no need to build it ... just grab the newest snapshot http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/ > > 2) ActiveMQ seems to block when there's no message in a queue. I was using > > the Stomp PHP API (which doesn't handle this gracefully) and the REST > > interface (which seems ignore the timeout GET param). Isn't there an easy > > way for polling a queue? > You could adjust the code to create a non blocking stream and use > stream_select and such, rather than plain old fgets/fread. The > Stomp-class is quite trivial to read and adjust (you only need to adjust > the readFrame-method). This is on my todo list (http://stomp.codehaus.org/PHP#PHP-TODO) and I hope I will have it soon. Of course, any contribution is more than welcomed. > > > 3) Although I can see pending messages in a queue in the web console, the > > REST / Stomp APIs block when trying to fetch them. Any ideas here? > I'm not sure what you mean by 'block' ? > > > 4) Why aren't messages automatically deleted from the queue, when I fetch > > them (subscribe in Stomp, GET in REST)? > The php-stomp implementation defaults to client-acknowledgement when you > subscribe. So you have to explicitly ack(nowledge) your message's (the > id you need is in the headers of the received frame) and/or you could > adjust the code Stomp-class to not set the acknowledgement to client. > You only need to remove a single line for that in subscribe(). You can easily modify this behavior with the headers, for example $conn->subscribe("/queue/test", array("ack"=>"auto")); I'll make this configurable on the class level and document it. Cheers -- Dejan Bosanac www.scriptinginjava.net