Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 32484 invoked from network); 20 Dec 2007 15:15:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Dec 2007 15:15:00 -0000 Received: (qmail 51014 invoked by uid 500); 20 Dec 2007 15:14:48 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 50972 invoked by uid 500); 20 Dec 2007 15:14:48 -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 50899 invoked by uid 99); 20 Dec 2007 15:14:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2007 07:14:48 -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 72.14.202.183 as permitted sender) Received: from [72.14.202.183] (HELO ro-out-1112.google.com) (72.14.202.183) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2007 15:14:23 +0000 Received: by ro-out-1112.google.com with SMTP id d36so4524661roh.2 for ; Thu, 20 Dec 2007 07:14:26 -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=YOk2bBDFh70/G7u9MuiiNgNRadIdoCsYw1l6nVz5zYY=; b=ZGWBAqOp7WSl5IHlg73wTT4YLs3+FetZkExhjrs8TOsYG6dnpH7TODiBxJBQxbmpAywNtnroFTkEZC8pPHo86//c1Des0UQHNuIbbtmI+4lm6XH3ud74qhKtnDdMwo4uV5cVVuveDOaNh+jL3xeP+/3CPAgSLaAUKAKXYkT8aRQ= 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=X7hUDB2MC0lAXOMTl+U1OM4vLQB51djADfKPoz2pOzFpfkczbk6aatEVeXbqaVFhGEfswR9f88NBnUAqzAXJNPNE+cef2Z+VR6TzdfrqG1p+3dpiUYKGxgJjR1T4JC51T9a6J2TSA6RuxeLYCvMwhO9mxkrO0J6+zL44g+gOP0I= Received: by 10.35.86.19 with SMTP id o19mr97155pyl.9.1198163665454; Thu, 20 Dec 2007 07:14:25 -0800 (PST) Received: by 10.35.107.5 with HTTP; Thu, 20 Dec 2007 07:14:25 -0800 (PST) Message-ID: <36e91d9d0712200714q170fb8fct72a5021914b1ff93@mail.gmail.com> Date: Thu, 20 Dec 2007 16:14:25 +0100 From: "Dejan Bosanac" Sender: chubrilo@gmail.com To: dev@activemq.apache.org Subject: Re: More on Stomp and Security In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <36e91d9d0712190728p6ee3ef2dg4a777d52ae95468f@mail.gmail.com> <36e91d9d0712200310h346d6d05pf0700ce27e237916@mail.gmail.com> X-Google-Sender-Auth: 1459dc517c77399f X-Virus-Checked: Checked by ClamAV on apache.org Great. Thanks. I'll modify and document PHP client accordingly and test against snapshot tomorrow (or for the weekend in worst case). A sentence or two in the AMQ's wiki Stomp section will be nice too ... On Dec 20, 2007 3:39 PM, Hiram Chirino wrote: > Patch applied /w some small modifications. We now also handle the > case where a broker sends an Exception to a connection that was not > related to any client request (this some times happens since the > broker operating async). > > > On Dec 20, 2007 6:10 AM, Dejan Bosanac wrote: > > Yup, I've overlooked receipts completely (partially because they are > > not covered with test cases) :) > > > > I'll add some test cases for receipt functionality in general, > > refactor stomp to send errors only when the receipt-id header is > > defined and modify PHP client so it can send commands with or without > > waiting for receipts (by default it should wait for a receipt). > > > > Thanks > > -- > > Dejan Bosanac > > www.scriptinginjava.net > > > > > > > > On Dec 19, 2007 6:27 PM, Hiram Chirino wrote: > > > I don't think the hack is needed. If the SEND comes in requesting the > > > response, then the error will be given like in the CONNECT command. > > > But if the SEND come in without it, then the user is doing an async > > > SEND. Error messages should get sent down the channel in an ASYNC > > > fashion too. The user won't be able to correlate the Error message to > > > the right SEND, but this is the price that is paid when async SENDS > > > are done, but what you gain is your producer can send messages faster. > > > > > > Regards, > > > Hiram > > > > > > > > > On Dec 19, 2007 10:28 AM, Dejan Bosanac wrote: > > > > I've just modified and tested PHP client against patch provided for > > > > https://issues.apache.org/activemq/browse/AMQ-1272 > > > > > > > > It seems that all work fine. A couple of notes: > > > > > > > > - CONNECT command is not a problem ... we wait for a frame back in any > > > > case, so one should just check whether a frame is CONNECTED or ERROR. > > > > - SUBSCRIBE is similar, since you're probably gonna wait for a frame > > > > in any case (waiting for messages), so just check whether a received > > > > frame is MESSAGE or ERROR > > > > - For SEND command, I implemented a little "hack" to make it work as > > > > I desired. Basically, you usually don't wait for frames after sending > > > > a message, so there is a chance that an error will be missed. So I > > > > sleep for a millisecond and try to read from a socket in a > > > > non-blocking mode. If there's nothing there it is probably OK. In > > > > other case I read a frame and check if it is ERROR and report this > > > > back to the application. > > > > > > > > Maybe someone else should take a look at this and commit it if it is > > > > OK (so people that need this can go with SNAPSHOT). I'll then document > > > > it for PHP client. Also, maybe we should notify stomp-dev list of the > > > > change and even put in the spec that people should check for error > > > > frames after SEND and SUBSCRIBE. > > > > > > > > Comments are more then welcomed. > > > > > > > > Thanks > > > > -- > > > > Dejan Bosanac > > > > www.scriptinginjava.net > > > > > > > > > > > > > > > > -- > > > Regards, > > > Hiram > > > > > > Blog: http://hiramchirino.com > > > > > > Open Source SOA > > > http://open.iona.com > > > > > > > > > -- > > Regards, > Hiram > > Blog: http://hiramchirino.com > > Open Source SOA > http://open.iona.com > -- Dejan Bosanac www.scriptinginjava.net