c#. MSMQ .The max size of a single message
Asked Answered
G

2

15

Using msmq I want to send a message (near 1 GB). I want to send array of bytes. But I can send only 4 MB. How can I get around this limitation ?

Glum answered 15/1, 2013 at 6:15 Comment(4)
A limit has always been part of MSMQ. Perhaps you should look at another package.Daren
Yeah. "Reading the documentation" and "learning the tools you use" are concepts worth discussing. The 4mb limit is fundamental to MSMQ for a long time - it is not a file store.Resinoid
symantec.com/connect/forums/how-increase-size-msmq-driveNomarch
Updated URL: vox.veritas.com/t5/Enterprise-Vault/…Anesthesiology
B
18

As you know the maximum size of a message in MSMQ is 4Mb, its better to go for some other solutions.

Solution : If you want to transfer data that exceeds this size, you will have to cut it into chunks in the sender's side, and recombine it in the receiver side.

Why is there a 4MB limit on MSMQ messages? Check out this blog.

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

Blakeblakelee answered 15/1, 2013 at 6:48 Comment(3)
in the process of testing, I found this size (4 MB)Glum
Yup. Try Split data into server parts, each < 4MB and combine them at the destination.Blakeblakelee
@ Zhenia : Limit your byte arrays by under 4 MB each on sender's side and combine them at the destination.Blakeblakelee
O
6

Do you have to stick to pure MSMQ? If you might consider switching to NServiceBus, it has a feature called DataBus which can effectively place a large payload outside of MSMQ, but ties the payload to an MSMQ message.

(It also, in my experience, makes working with MSMQ far more pleasant from C#. But YMMV)


If you can't use NServiceBus, you could at least be inspired by it. Generate a random file name, store the content on a share accessible to both endpoints, include the file name in your message.

Owenism answered 15/1, 2013 at 7:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.