The problem is actually with the non-blocking socket implementation in my PHP/Stomp client. I'll have to investigate little bit more on this in order to implement it better.
Do you have some experience with non-blocking sockets and Stomp with ActiveMQ? Thanks Cheers, Ivan Ivan Jovanovic wrote: > > HI, > > I succeeded to put big messages on my broker with your PHP/Stomp client > and your test code. > > I'll look inside my Stomp client a bit deeper to see what happens. > > Thanks for bringing back hope on the stage ;) > > > Cheers, > Ivan > > Dejan Bosanac wrote: >> >> Hi, >> >> I've tried and cannot reproduce this issue. >> >> here's first a test case trying to send/receive a large message (as Ivan >> described in one of previous emails) >> >> public void testSendLargeMessage() throws Exception { >> >> MessageConsumer consumer = session.createConsumer(queue); >> StringBuffer body = new StringBuffer(); >> for (int i = 0; i < 10000000; i++) { >> body.append("test"); >> } >> String frame = "CONNECT\n" + "login: system\n" + "passcode: >> manager\n\n" + Stomp.NULL; >> stompConnection.sendFrame(frame); >> >> frame = stompConnection.receiveFrame(); >> assertTrue(frame.startsWith("CONNECTED")); >> >> frame = "SEND\n" + "destination:/queue/" + getQueueName() + >> "\n\n" + >> body.toString() + Stomp.NULL; >> >> stompConnection.sendFrame(frame); >> >> TextMessage message = (TextMessage)consumer.receive(10000); >> assertNotNull(message); >> assertEquals(body.toString(), message.getText()); >> >> // Make sure that the timestamp is valid - should >> // be very close to the current time. >> long tnow = System.currentTimeMillis(); >> long tmsg = message.getJMSTimestamp(); >> assertTrue(Math.abs(tnow - tmsg) < 1000); >> } >> >> and here's a PHP Stomp code trying to do the same >> >> <?php >> include 'Stomp.php'; >> $i = 0; >> $stomp = new Stomp("tcp://localhost:61613"); >> $stomp->sync=false; >> $stomp->connect(); >> >> $body = ""; >> for ($i = 0; $i < 1000000; $i++) { >> $body .= "test"; >> } >> >> $stomp->send("/queue/test", $body); >> >> $stomp->subscribe("/queue/test"); >> $msg = $stomp->readFrame(true); >> >> if ($msg->body != $body) { >> echo "wrong!"; >> } >> >> $stomp->ack($msg); >> >> $stomp->disconnect(); >> ?> >> >> can anyone send either Java or PHP code that causes this issue? Can you >> provide more info about your environment: OS/Java/PHP setup? >> >> Regards >> -- >> Dejan Bosanac >> www.scriptinginjava.net >> >> On Tue, Jun 3, 2008 at 6:14 PM, gwittel <[EMAIL PROTECTED]> wrote: >> >>> >>> >>> Ivan Jovanovic wrote: >>> > >>> > I'm experiencing the same problem with the large messages in >>> PHP/Stomp. >>> > >>> > Did you solve this one, since your problem dates from couple of months >>> > ago? >>> > >>> >>> Hi, >>> >>> We were not able to find a solution other than not to send such large >>> messages. We haven't tried 5.1 so I don't know if the problem still >>> persists in the current releases. >>> >>> -Greg >>> >>> >>> gwittel wrote: >>> > >>> > Hi >>> > >>> > We're using a Perl/Stomp client to retrieve messages out of a standard >>> > queue. When a large message was encountered (~20MB of XML), the >>> client >>> > stopped processing data. After more debugging, it looks like the >>> server >>> > throws an exception when a client hits this message or opens a queue >>> with >>> > this message at the front of the queue: >>> > >>> > 2008-01-03 09:23:05,769 [serverip:42663] DEBUG Transport >>> > - Transport failed: java.io.EOFException >>> > java.io.EOFException >>> > at java.io.DataInputStream.readByte(Unknown Source) >>> > at >>> > >>> org.apache.activemq.transport.stomp.StompWireFormat.readLine(StompWireFormat.java:186) >>> > at >>> > >>> org.apache.activemq.transport.stomp.StompWireFormat.unmarshal(StompWireFormat.java:94) >>> > at >>> > >>> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:190) >>> > at >>> > >>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:182) >>> > at >>> > >>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:170) >>> > at java.lang.Thread.run(Unknown Source) >>> > 2008-01-03 09:23:05,769 [serverip:42663] DEBUG TransportConnection >>> > - Stopping connection: /serverip:42663 >>> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TcpTransport >>> > - Stopping transport tcp:///serverip:42663 >>> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TransportConnection >>> > - Stopped connection: /serverip:42663 >>> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TransportConnection >>> > - Cleaning up connection resources: /serverip:42663 >>> > 2008-01-03 09:23:05,770 [serverip:42663] DEBUG TransportConnection >>> > - Connection Stopped: /serverip:42663 >>> > >>> > We're using AMQ 5.0-RC3 with the AMQ persistent store. Since this >>> error >>> > was encountered on a production system I have not yet been able to >>> upgrade >>> > the host to the 5.0-Release. Any thoughts on how we can debug the >>> issue, >>> > if its a server memory issue (JVM is allowed 1GB at this time), or >>> some >>> > other problem. I was able to view the message via the HTTP admin GUI >>> > without an exception being thrown. >>> > >>> > Thanks, >>> > -Greg >>> > >>> >>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/EOF-Exception-When-Serializing-Large-Message-tp14671931s2354p17627420.html >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>> >>> >> >> >> >> <http://www.scriptinginjava.net> >> >> >> ----- >> Dejan Bosanac >> www.scriptinginjava.net >> > > -- View this message in context: http://www.nabble.com/EOF-Exception-When-Serializing-Large-Message-tp14671931s2354p17671973.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.