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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 >
