Azure的队列存储:在邮件中发送文件 [英] Azure Queue Storage: Send files in messages

查看:179
本文介绍了Azure的队列存储:在邮件中发送文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Azure评估队列存储两个分离的应用程序之间的通信。

I am assessing Azure Queue Storage to communicate between two decoupled applications.

我的要求是发送一个文件(平面文件,大小:从小到大),队列中的消息

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

按我读队列中的个人信息不能超过64KB之外,所以发送可变大小的文件的消息是毫无疑问的。

As per my reading an individual message in a queue cannot exceed beyond 64KB, so sending a file of variable size in the message is out of question.

我能想到的是使用队列存储和Blob存储相结合的另一种解决方案,即在队列中的消息时,需要从BLOB读取文件添加到该文件的引用(在Blob存储),然后(使用参考队列中的消息/地址)。

Another solution I can think of is using a combination of Queue Storage and blob storage, i.e. in the queue message add a reference to the file (on blob storage) and then when required read the file from the blob (using the reference/address in the queue message).

我的问题是,这是一个正确的做法?还是有其他优雅的方式来实现这一目标?

My question is, is this a right approach? or are there any other elegant ways to achieving this?

谢谢,
桑迪普

Thanks, Sandeep

推荐答案

虽然没有的右键的办法,因为你可以把你在队列中的消息(大小范围内)想要的任何东西,想想看:如果你的文件大小可以走了过来64K,你根本无法将这些队列消息中存储,这样你就没有别的选择,只能存储内容在其他地方(如斑点)。对于64K下的文件,你需要决定是否要两种不同的方法处理的文件,或者只是使用斑点作为全线您的文件来源,有一个一致的方法。

While there's no right approach, since you can put anything you want in a queue message (within size limits), consider this: If your file sizes can go over 64K, you simply cannot store these within a queue message, so you will have no other choice but to store your content somewhere else (e.g. blobs). For files under 64K, you'll need to decide whether you want two different methods for dealing with files, or just use blobs as your file source across the board and have a consistent approach.

还记得,消息传递会吃带宽和处理。如果您存储在队列中的消息您的文件,你需要考虑到这一点具有高容量消息传递,你还需要从你的队列中的消息提取您的文件内容。

Also remember that message-passing will eat up bandwidth and processing. If you store your files in queue messages, you'll need to account for this with high-volume message-passing, and you'll also need to extract your file content from your queue messages.

一件事:如果您在存储内容的斑点,你可以使用任意数量的工具来处理这些文件,的文件保留在Blob存储永久(直到您明确删除它们)。队列中的消息必须处理之后被删除,让你没有选择,让您的文件来解决。这可能是需要考虑的一个重要方面。

One more thing: If you store content in blobs, you can use any number of tools to manipulate these files, and your files remain in blob storage permanently (until you explicitly delete them). Queue messages must be deleted after processing, giving you no option to keep your file around. This is probably an important aspect to consider.

这篇关于Azure的队列存储:在邮件中发送文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆