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
