Wednesday, August 12, 2009 12:13 AM Sean Feldman

MSMQ With Files Larger Than 10MB?

Update 2009-09-11: I was playing with the sample provided in two comments, and has run into issue with chunking binding. See thread: http://code.msdn.microsoft.com/msmqpluswcf/Thread/View.aspx?ThreadId=2265

Has anyone dealt with this issue before? We are running into a problem when our system has to use queues, but files can be more than 10MB.

I have googled around, and found a few things about MSMQ/T (BizTalk related/unrelated), but nothing concrete (example).

Has anyone had some production code with messages more than 4MB using MSMQ/T and can point to the right resources? Thank you.

Filed under:

Comments

# MSMQ With Files Larger Than 10MB? | ASP Scribe

Wednesday, August 12, 2009 2:45 AM by MSMQ With Files Larger Than 10MB? | ASP Scribe

Pingback from  MSMQ With Files Larger Than 10MB? | ASP Scribe

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 6:08 AM by Pawel Pabich

Hi,

I can think of 2 solutions.

1. Split each file into server parts, each < 4MB and combine them at the destination.

2. Upload file to a shared drive/ftp/etc and send only the url to the file in the message

Hope this helps

Pawel

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 8:06 AM by Sateesh Deshpande

Hi Sean,

MSMQ can support messages under 4 MB in size only, this includes Queued Components messages. Any attempt to send a message through the system that is larger than this will raise the insufficient resources error. Be aware that Unicode data takes up twice as much space as non-Unicode data, as two bytes are needed for each character.

Please validate or try to reduce the file size to 4 MB.

Regards,

Sateesh Deshpande

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 8:06 AM by Sateesh Deshpande

Hi Sean,

MSMQ can support messages under 4 MB in size only, this includes Queued Components messages. Any attempt to send a message through the system that is larger than this will raise the insufficient resources error. Be aware that Unicode data takes up twice as much space as non-Unicode data, as two bytes are needed for each character.

Please validate or try to reduce the file size to 4 MB.

Regards,

Sateesh Deshpande

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 9:40 AM by John Breakwell

How about:

198686 How to send files larger than 4 MB by using Microsoft Message Queuing

support.microsoft.com/default.aspx

Cheers

John Breakwell (MSFT)

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 10:31 AM by Sean Feldman

@Pawel, @Sateesh, @John

Thank you guys for helping. I am aware of the possibility to split the file up into chunks and transfer. I was looking into something that would allow to avoid this splitting, especially when system is driven by many queues. Yes, abstracting queue on sender/receiver side with chunking would work, but that would also introduce more "moving parts".

Again, thank you for your assistance.

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 11:03 AM by John Breakwell

Hi Sean,

MSMQ has a message size limit of 4Mb and the product group have no plans to change this.

You may have come across the MaxMessageSize registry value but, altough this is documented online, you shouldn't change it. This isn't a "nudge, nudge, try this" comment. It's a "don't try this" comment.

There are no alternatives to managing the file in chunks. The only choice is *how* you chunk the file.

Cheers

John Breakwell (MSFT)

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 1:25 PM by Sean Feldman

@John,

Thank you for mentioning registry option. It did not look good indeed :) won't touch it.

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 10:07 PM by Grant Samuels

# re: MSMQ With Files Larger Than 10MB?

Wednesday, August 12, 2009 10:55 PM by Sean Feldman

@Grant,

thank you so much! I am definitely going to watch it.

# re: MSMQ With Files Larger Than 10MB?

Monday, August 31, 2009 10:05 AM by Koega

Chunking, siehe code.msdn.microsoft.com/msmqpluswcf

muss man aber MSMQChunkingDuplexSessionChannel überschreiben, da der obere Beispiel SubQueue bildet (nur für MSMQ 4.0, nicht für frühere Windows Versionen z.B. XP)