2

What is currently considered state-of-art, so to speak, when transferring large files over Apache NMS (using ActiveMQ)? Putting the whole content into a StreamMessage? However, I've seen the naming here is a bit misleading as the file isn't actually streamed over JMS, the entire content will reside in memory (or disk?) and will be sent all at once. Here I got some problems with files > 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.

BlobMessage is not supported in NMS...I really see no option but to split the file in chunks, re-assemble them on the other side, etc.

Thank you, Cristian.

Cristian
  • 21
  • 2
  • You are correct, you need to split the file into manageable pieces, JMS wasn't really designed as a file server. You can take a look at the ActiveMQInputStream and ActiveMQOutputStream classes in the Java client, you might be able to port that to .NET – Tim Bish Apr 07 '11 at 10:14

1 Answers1

0

how about using GZIPInputStream, for example : GZIPInputStream inputStream = new GZIPInputStream(new ByteArrayInputStream(gzipped));

  • The content is already compressed. And it's C# code (Apache NMS) I'm talking about, which I believe is lacking a lot of functionality when compared to the ActiveMQ Java interface... – Cristian Apr 07 '11 at 09:02
  • NMS supports compression of Messages natively, just turn the Connection's compression setting on via connection.UseCompression = true; – Tim Bish Apr 07 '11 at 10:16