Is there a way to make them disk-only?<br><br>I tried the updated version with the persistent switch and it died after a million messages as well, unfortunately.<br><i><br>for(int i = 0; i < LIMIT; i++) {<br> String msg = createMessageText(i);<br>
byte[] bytes = msg.getBytes();<br> <br> channel.basicPublish(exchange, key, true, false, <b>MessageProperties.PERSISTENT_TEXT_PLAIN,</b> bytes);<br> <br> }</i><br>
<br>We get this on the Java side:<br><br>java.net.SocketException: Broken pipe<br> at java.net.SocketOutputStream.socketWrite0(Native Method)<br> at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)<br>
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)<br> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)<br> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)<br>
at java.io.DataOutputStream.flush(DataOutputStream.java:106)<br> at com.rabbitmq.client.impl.SocketFrameHandler.writeFrame(SocketFrameHandler.java:164)<br> at com.rabbitmq.client.impl.AMQConnection.writeFrame(AMQConnection.java:302)<br>
at com.rabbitmq.client.impl.AMQCommand.transmit(AMQCommand.java:197)<br> at com.rabbitmq.client.impl.AMQChannel.quiescingTransmit(AMQChannel.java:309)<br> at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:285)<br>
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:392)<br> at test.RabbitMQProducer.main(RabbitMQProducer.java:57)<br>Exception in thread "main" com.rabbitmq.client.AlreadyClosedException (clean connection shutdown; reason: Attempt to use closed channel)<br>
at com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:189)<br> at com.rabbitmq.client.impl.AMQChannel.processShutdownSignal(AMQChannel.java:257)<br> at com.rabbitmq.client.impl.ChannelN.processShutdownSignal(ChannelN.java:164)<br>
at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:337)<br> at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:291)<br> at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:285)<br> at test.RabbitMQProducer.main(RabbitMQProducer.java:73)<br>
<br>and {badrpc,nodedown} when querying for status.<br><br>Jacek<br><br><br><br><br><div class="gmail_quote">On Wed, Apr 22, 2009 at 9:40 AM, Matthias Radestock <span dir="ltr"><<a href="mailto:matthias@lshift.net">matthias@lshift.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Jacek,<div class="im"><br>
<br>
Jacek Furmankiewicz wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ah, I missed that. I guess that relates to this part of the docs?<br>
</blockquote>
<br></div>
Yes, but if your messages don't fit into memory when not marked as persistent then they sure won't fit when they are - as Alexis said, persistent messages are kept in *both* memory and disk.<br><font color="#888888">
<br>
<br>
Matthias.<br>
</font></blockquote></div><br>