Read large message file (*.msg) stuck in HornetQ

帅比萌擦擦* 提交于 2021-01-29 05:10:56

问题


I am working on a app which has a lot of asynchronous messages hosted by HornetQ 2.3.21. By some process my message size goes more than 2GB and the message starts failing with this message on the server:

HQ212017: error adding packet: java.lang.IllegalStateException: Maximum size of 2gb exceeded
   at org.jboss.netty.buffer.DynamicChannelBuffer.ensureWritableBytes(DynamicChannelBuffer.java:82) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
   at org.jboss.netty.buffer.DynamicChannelBuffer.writeByte(DynamicChannelBuffer.java:205) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
   at org.hornetq.core.buffers.impl.ChannelBufferWrapper.writeByte(ChannelBufferWrapper.java:539) [hornetq-commons-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.buffers.impl.ResetLimitWrappedHornetQBuffer.writeByte(ResetLimitWrappedHornetQBuffer.java:249) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.client.impl.ClientLargeMessageImpl$HornetQOutputStream.write(ClientLargeMessageImpl.java:205) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at java.io.OutputStream.write(OutputStream.java:116) [rt.jar:1.8.0_251]
   at org.hornetq.utils.InflaterWriter.doWrite(InflaterWriter.java:106) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.utils.InflaterWriter.write(InflaterWriter.java:63) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at java.io.OutputStream.write(OutputStream.java:116) [rt.jar:1.8.0_251]
   at java.io.OutputStream.write(OutputStream.java:75) [rt.jar:1.8.0_251]
   at org.hornetq.core.client.impl.LargeMessageControllerImpl.addPacket(LargeMessageControllerImpl.java:185) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.client.impl.ClientConsumerImpl.handleLargeMessageContinuation(ClientConsumerImpl.java:748) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.client.impl.ClientSessionImpl.handleReceiveContinuation(ClientSessionImpl.java:935) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.client.impl.ClientSessionPacketHandler.handlePacket(ClientSessionPacketHandler.java:65) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:641) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:557) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:533) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1693) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:165) [hornetq-server-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:105) [hornetq-core-client-2.3.21.Final-redhat-1.jar:2.3.21.Final-redhat-1]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_251] 

This message is stored on the filesystem in the messaginglargemessages folder.

I want to read the message to see which process is causing the issue, but the message is encoded in a binary format. How can I read this file? I tried some utilities available on Internet to convert .msg files, also changed the encoding, also tried sending this message to code which reads binary files but no luck. I am not sure the contents of message will be human readable or not. We need to get the module name which should be part of this message. Once we get the module name we might find some other solutions for 2GB error.

The operating system is Windows but we see the same messages and issues on Linux as well.

来源:https://stackoverflow.com/questions/64025468/read-large-message-file-msg-stuck-in-hornetq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!