7

I'm using Azure Queue to send emails. But for last time I'm getting exception about queue size limit up to 65536 bytes even after cheking the message size.

enter image description here

4

2 回答 2

17

虽然消息的最大大小确实可以为 64KB,但 Azure 使用 UTF16 编码来存储数据,因此对于您提供的每个数据字节,Azure 存储使用 2 个字节来存储该数据。

这意味着您基本上可以在 Azure 队列中的消息中存储多达 32KB 的数据。因为您超出了这个 32KB 的限制,所以您收到了这个错误。

于 2016-09-16T10:19:11.407 回答
1

字符串消息将在发送之前进行 Base64 编码,从而将其长度增加约三分之一。

因此,您可以提交的消息字符串的最大长度是 49152,相当于允许的最大值 65536。

计算 Base64 编码长度的公式可以在这里找到:https ://stackoverflow.com/a/13378842/5836877

于 2019-07-26T12:53:38.747 回答