小编147*_*147的帖子

如何使用 azure 服务总线 5.0.0 在 C# azure 函数中手动处理消息完成

我正在编写一个 Azure 函数来获取 Azure 服务总线中的消息。我想手动处理任何异常("autoCompleteMessages": false)无法弄清楚如何将完整或放弃发送回服务队列。

尝试过选项1:

[FunctionName("SBQ_F1_VC")]
public static async Task Run([ServiceBusTrigger("sbqfn1", Connection = "BrnlTest1_SERVICEBUS")]
    ServiceBusReceivedMessage msg, ILogger log)
{
//.....

    if(!Int32.TryParse(msg.ApplicationProperties.GetValueOrDefault("vid").ToString(), out vid))
    {   await using ServiceBusClient client = new ServiceBusClient(Environment.GetEnvironmentVariable("BrnlTest1_SERVICEBUS"));
        ServiceBusReceiver msgRcvr = client.CreateReceiver(Environment.GetEnvironmentVariable("queueName"), new ServiceBusReceiverOptions()); 
        //await msgRcvr.RenewMessageLockAsync(msg);
        await msgRcvr.AbandonMessageAsync(msg);  //vid = 0;
    }

//.....
}
Run Code Online (Sandbox Code Playgroud)

错误选项 1

System.Private.CoreLib: Exception while executing function: SBQ_F1_VC. Azure.Messaging.ServiceBus: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or …
Run Code Online (Sandbox Code Playgroud)

c# azure azureservicebus azure-functions

11
推荐指数
1
解决办法
8036
查看次数

如何在Qt Creator中使用英特尔C++编译器

我正在编写一个程序,其中我将需要进行大量的数值计算.但是因为我在Qt Creator中开发程序的前端,所以我还在处理MinGW.

因此,有没有办法将英特尔C++编译器与QT Creator集成或使用?

目前使用IC++ 11.0和QtCreator 1.2.1

c++ compiler-construction integration qt intel

8
推荐指数
1
解决办法
6428
查看次数