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 <jamiemccrin...@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. >