activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: ActiveMQ FuseSource Stomp large payloads problem
Date Tue, 19 Jan 2010 16:56:30 GMT
You just need to register in jira - https://issues.apache.org/activemq/secure/Signup!default.jspa

  - then you should be able to raise a bug
On 19 Jan 2010, at 16:49, Jamie McCrindle wrote:

> Hiya,
>
> We've worked around the problem by increasing the buffer size but it's
> not the best solution. I'd like to raise a bug in Jira but it's for
> authorized users only. Is there another way to get it in?
>
> cheers,
> j.
>
> On Thu, Jan 14, 2010 at 11:30 AM, Jamie McCrindle
> <jamiemccrindle@gmail.com> wrote:
>> Will post an issue. I'll see if I can submit a patch as well
>>
>> cheers,
>> j.
>>
>> ps: I've cross posted to stackoverflow to see if the php geniuses  
>> over
>> there have some ideas.
>>
>> On Thu, Jan 14, 2010 at 11:26 AM, Dejan Bosanac  
>> <dejan@nighttale.net> wrote:
>>> Hi Jamie,
>>>
>>> thanks for pointing to this issue. The best approach is to file a  
>>> bug in
>>> project's Jira (http://fusesource.com/issues/browse/STOMP) and  
>>> we'll take it
>>> from there (a patch that solves it would be even better).
>>>
>>> Cheers
>>> --
>>> Dejan Bosanac - http://twitter.com/dejanb
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>>
>>> On Thu, Jan 14, 2010 at 12:09 PM, Jamie McCrindle
>>> <jamiemccrindle@gmail.com>wrote:
>>>
>>>> Hi All,
>>>>
>>>> It appears that the ActiveMQ FuseSource Stomp PHP client can't  
>>>> handle
>>>> messages larger than 1024 bytes. The code is as follows in  
>>>> Stomp.php:
>>>>
>>>>        $rb = 1024;
>>>>        $data = '';
>>>>        $end = false;
>>>>
>>>>        do {
>>>>            $read = fread($this->_socket, $rb);
>>>>            if ($read === false) {
>>>>                $this->_reconnect();
>>>>                return $this->readFrame();
>>>>            }
>>>>            $data .= $read;
>>>>            if (strpos($data, "\x00") !== false) {
>>>>                $end = true;
>>>>                $data = rtrim($data, "\n");
>>>>            }
>>>>            $len = strlen($data);
>>>>        } while ($len < 2 || $end == false);
>>>>
>>>> If I set $rb to a larger value e.g. 1048576, it consumes the whole
>>>> message and works as expected. What appears to be happening is that
>>>> the first 1024 bytes are read, the loop exit condition is not met  
>>>> and
>>>> then the client hangs on the $read = fread($this->_socket, $rb);  
>>>> line.
>>>>
>>>> I'm using:
>>>>
>>>> Mac OS X Leopard (yeah, I'll upgrade when I have more disk space...
>>>> the irony is that by upgrading I save disk space... *sigh*)
>>>> PHP 5.2.11
>>>>
>>>> Let me know if I should publish this to the fusesource dev  
>>>> mailing list
>>>> instead
>>>>
>>>> cheers,
>>>> j.
>>>>
>>>
>>

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/






Mime
View raw message