更新时间:2023-11-25 12:53:46
在 Azure Service Bus 团队的帮助下,我找到了这个问题的解决方案(实际上,他们给了我这个解决方案).messageBody
的基本元素应该使用 AMQP 类型正确编码.
With help of Azure Service Bus team, I was able to find a solution to this problem (in fact, they gave me this solution). Essentially elements of messageBody
should be properly encoded using AMQP types.
以下代码有效:
var messageBody = {
'from-sequence-number': client.types.wrap_long(1),
'message-count': client.types.wrap_int(5)
};
const msg = {
application_properties: {
operation: 'com.microsoft:peek-message'
},
body: messageBody,
reply_to: 'receiver-link'
};