activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <>
Subject Re: More on Stomp and Security
Date Wed, 19 Dec 2007 17:27:35 GMT
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.


On Dec 19, 2007 10:28 AM, Dejan Bosanac <> wrote:
> I've just modified and tested PHP client against patch provided for
> 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



Open Source SOA

View raw message