Getting “amqp:internal-error” when peeking messages from Azure Service Bus Queue using AMQP, rhea and Node

拥有回忆 提交于 2019-12-01 13:40:21

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.

Following code works:

  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'
  };
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!