Azure Queue Storage: Send Files in Messages

I am evaluating Azure Queue storage for communication between two decoupled applications.

My requirement is to send a file (flat file, size: small to large) to a queue message.

As per my reading, a single message in the queue cannot exceed a value higher than 64KB, so sending a variable size file in a message is out of the question.

Another solution I can think of is to use a combination of queue store and blob store, that is, in the queue message, add a link to the file (to the blob store) and then, when necessary, read the file from the blob (using the / address link in the queue message ).

My question is, is this the correct approach? or are there other elegant ways to achieve this?

Thanks, Sandeep

+3


source to share


1 answer


There is no right approach yet, since you can put whatever you want in the queue message (within the size limit), consider: if your file sizes can exceed 64KB, you simply cannot store them in the queue message, so you have no other choice except to store your content somewhere else (like blobs). For files under 64K, you need to decide if you want to use two different methods for working with files, or just use blobs as a source of files across the board and have a consistent approach.

Also remember that messaging will consume bandwidth and processing. If you store your files in queue messages, you will need to account for this when transferring large volumes of messages, and you will also need to extract the contents of your file from the queue messages.



One more thing: if you store content in blocks, you can use any number of tools to manage those files, and your files remain in the blob store forever (until you explicitly delete them). Queue messages must be removed after processing, which prevents you from saving the file. This is probably an important aspect.

+3


source







All Articles