5120 byte message causes problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Allen_Wyatt
Posted On:   Wednesday, March 6, 2002 01:09 PM

When I try setting up a queue sender that sends 5120 byte messages I get the following exception: Exception in thread "CompileThread0" java.lang.OutOfMemoryError: requested 65544 bytes Possible causes: - not enough swap space left, or - kernel parameter MAXDSIZ is very small. java.lang.OutOfMemoryError: at java.util.zip.Deflater.init(Native Method) at java.util.zip.Deflater. (Deflater.java:97) at java.util.zip.GZIPOutputStream. (GZIPOutputStream.java:43) at com.swiftmq.tools.util.Compressor.compress(Compressor.java:13) at com.swiftmq.jms.MessageImpl.writeContent(MessageImpl.java:309) at com.swiftmq.jms.s   More>>

When I try setting up a queue sender that sends 5120 byte messages I get the following exception:


Exception in thread "CompileThread0" java.lang.OutOfMemoryError: requested 65544 bytes

Possible causes:

- not enough swap space left, or

- kernel parameter MAXDSIZ is very small.

java.lang.OutOfMemoryError:

at java.util.zip.Deflater.init(Native Method)

at java.util.zip.Deflater. (Deflater.java:97)

at java.util.zip.GZIPOutputStream. (GZIPOutputStream.java:43)

at com.swiftmq.tools.util.Compressor.compress(Compressor.java:13)

at com.swiftmq.jms.MessageImpl.writeContent(MessageImpl.java:309)

at com.swiftmq.jms.smqp.ProduceMessageRequest.writeContent(ProduceMessageRequest.java:63)

at com.swiftmq.tools.dump.Dumpalizer.dump(Dumpalizer.java:37)

at com.swiftmq.jms.ConnectionImpl.writeObject(ConnectionImpl.java:264)

at com.swiftmq.jms.ConnectionImpl.performRequest(ConnectionImpl.java:274)

at com.swiftmq.tools.requestreply.RequestRegistry.request(RequestRegistry.java:84)

at com.swiftmq.jms.MessageProducerImpl.processSend(MessageProducerImpl.java:138)

at com.swiftmq.jms.QueueSenderImpl.send(QueueSenderImpl.java:100)

at jms.QSend$PublisherThread.run(QSend.java:572)

at java.lang.Thread.run(Unknown Source)



The same application using 1024 byte messages works without a problem. Any ideas what is wrong?

   <<Less

Re: 5120 byte message causes problem

Posted By:   Andreas_Mueller  
Posted On:   Thursday, March 7, 2002 04:52 AM

SwiftMQ uses message body compression by default. The threshold is 2 KB. As you see, 64 KB are requested during compression and your client runs out of memory. Give it more heap size, e.g. -mx256M. You can also switch the compression off by setting the resp. message property:



msg.setBooleanProperty("JMS_SWIFTMQ_BC",false);
About | Sitemap | Contact