简体   繁体   中英

Using Queue in Azure Storage

I am try to solve 1 problem with using AzureStorage.Queue in .NET.

First, I have 2 project, 1 project Web API, 1 project for WebJob. (All write in .NET Core 2.2)

  • My project API when Create new product, It will insert 1 message store Id of product to Message Queue in Azure (Queue name: product)

  • At same time in my project Web Job, I have 1 function using [QueueTrigger["product"]] to listen when new message inserted in my "product" queue. But I dont know why after message inserted to "product" queue, my message automatic deleted and inserted into another queue name "product-poison"?

  • I am using same connection string to Azure Storage in 2 Project. I Have try to use different connection string but result is the same.

Thanks for supporting me.

Your queue trigger function consumed the message generate by your API project, and it seems the function did not consume it with a correct format.

Here is an article tells why poison-queue has been generate: Poison messages

When a queue trigger function fails, Azure Functions retries the function up to five times for a given queue message, including the first try. If all five attempts fail, the functions runtime adds a message to a queue named -poison.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM