Implementing azure functions with storage queue

Study Case + Tutorial

The Problem:

original sequence diagram

The solution:

Enqueue Azure function
Dequeue Azure function
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post")] HttpRequest req,
[Queue("myqueue")] IAsyncCollector<ItemMetaData> queue)
List<ItemMetaData> itemsMetaData = await _exteranlApi.GetItemsMetaData();
foreach (ItemMetaData itemMetaData in itemsMetaData)
await queue.AddAsync(itemMetaData);
return new OkObjectResult("Done Enqueue items meta data");
public async Task Run([QueueTrigger("myqueue", Connection = "AzureWebJobsStorage")] ItemMetaData item)
Item item = await _repository.GetById(item.Id);

VendorItem vendorItem = await this._externalApi.GetById(item.Id);
if (IsShouldBeUpdated(item, vendorItem))
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true"



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store