Book Image

Learning NServiceBus - Second Edition

By : David Boike
Book Image

Learning NServiceBus - Second Edition

By: David Boike

Overview of this book

Table of Contents (18 chapters)
Learning NServiceBus Second Edition
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Transporting large payloads


When using any message queuing system, you will discover that very large messages are not a good idea. With MSMQ, there is a limit of 4 MB per message.

This may seem like a lot, but consider the situation we mentioned in Chapter 1, Getting on the IBus, where we're processing images for our clients. You might be able to squeeze most images into an MSMQ message, but you shouldn't bank on it. These days, 12-megapixel cameras that create 2.5 MB JPEG images (let's not even talk about RAW) are fairly commonplace, and once the message serializer Base64-encodes the byte array in the message, you'll be looking at 3.3 MB. That's way too close for comfort considering that the average number of megapixels has nowhere to go but up. Now consider the limits on most cloud-based message transports that are frequently much less than one megabyte!

Some other queuing systems don't have a hard limit, but that doesn't mean creating huge messages is a good idea. Because of the implications...