无法使用Azure功能将消息发送到Service Bus队列 [英] Unable to send message into Service Bus Queue using Azure function

查看:102
本文介绍了无法使用Azure功能将消息发送到Service Bus队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  静态      (   

我尝试使用另一个工作正常的队列,还删除了该队列并重新创建存在问题的静止消息进入死信队列,并且消息属性传递计数为11.

解决方案

有关详细信息,请参阅"".

而且,您可以参考以下链接中概述的类似建议问题.

https://medium.com/@DomBurf/clearing-the-dead-letter-queue-on-an -azure-service-bus-queue-3c942b312f98

免责声明: 此响应包含对第三方的引用 万维网站点. Microsoft为方便您而提供此信息. Microsoft不控制这些站点,也没有测试在这些站点上找到的任何软件或信息;因此,Microsoft无法就以下问题做出任何陈述: 在此找到的任何软件或信息的质量,安全性或适用性.使用Internet上发现的任何软件都存在固有的危险,Microsoft提醒您在检索任何软件之前,请务必完全了解该风险. 互联网上的软件.

--------------- -------------------------------------------------- ------------------------------

如果此答案有帮助,请单击标记为答案"或向上" -投票".要提供有关您的论坛体验的其他反馈,请单击 在这里 >

[FunctionName("Demo")]
        public static void Run([ServiceBusTrigger("%Demo-Queue%", Connection = "AzureWebJobsBPGAServiceBus")]string myQueueItem,
             [ServiceBus("%Update-Queue%", Connection = "AzureWebJobsBPGAServiceBus")] ICollector<BrokeredMessage> updateMessage,
            TraceWriter log)
        {
            string query = "SELECT Id FROM MyTable";

            var data = dbs.GetData(query).GetAwaiter().GetResult();

            BrokeredMessage brokeredMessage;
            foreach (var item in data)
            {
                JObject jObject = new JObject(new JProperty("Id", item), new JProperty("MessageId", new Guid(item)));
                brokeredMessage = new BrokeredMessage(jObject.ToString());
                updateMessage.Add(brokeredMessage);
            }
        }

But message going in dead letter queue . why ? Message format is also correct.Any clue ?

I tried using another queue it works fine, also delete that queue and re-create which has issue still message goes into dead letter queue and message property delivery count is 11.


SE

解决方案

The purpose of the dead-letter queue is to hold messages that cannot be delivered to any receiver, or messages that could not be processed. Messages can then be removed from the DLQ and inspected. An application might, with help of an operator, correct issues and resubmit the message, log the fact that there was an error, and take corrective action.

For more details, refer "Dead Letter Reason".

And, you may refer the suggest outlined in the below links which addresses similar issues..

https://stackoverflow.com/questions/42934356/how-do-you-delete-the-dead-letters-in-an-azure-service-bus-queue

https://medium.com/@DomBurf/clearing-the-dead-letter-queue-on-an-azure-service-bus-queue-3c942b312f98

Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

-----------------------------------------------------------------------------------------------

If this answer was helpful, click "Mark as Answer" or "Up-Vote". To provide additional feedback on your forum experience, click here


这篇关于无法使用Azure功能将消息发送到Service Bus队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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