使用 Apache NMS 传输大文件

问题描述 投票:0回答:1

可以说,在通过 Apache NMS(使用 ActiveMQ)传输大文件时,当前被认为是最先进的是什么?将整个内容放入 StreamMessage 中?然而,我发现这里的命名有点误导,因为文件实际上并不是通过 JMS 进行流式传输,整个内容将驻留在内存(或磁盘?)中,并将一次全部发送。我在处理大于 100 MB 的文件时遇到了一些问题:

Apache.NMS.NMSException : Unable to write data to the transport connection: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full

NMS 不支持

BlobMessage
。我真的没有其他选择,只能将文件分成块,在另一侧重新组装它们,等等。

file-transfer nms apache-nms
1个回答
0
投票

使用GZIPInputStream怎么样, 例如 : GZIPInputStream inputStream = new GZIPInputStream(new ByteArrayInputStream(gzipped));

© www.soinside.com 2019 - 2024. All rights reserved.