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.

7 Comments

  • 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

  • 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

  • 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

  • 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)

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

  • @Grant,
    thank you so much! I am definitely going to watch it.

  • 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)

Comments have been disabled for this content.