0
votes

Problem: We want to allow user to upload images and save them in azure blob. In case if azure blob is down then we will loose these image so we want to put a Queue between the Client and Blob.

Idea is that when user upload the image, it should go into Queue and then it should be picked up from the backend API to put into the Azure blob storage.

Azure Storage Queue and Service Bus has size limit of 64kb and 1mb only.

what other options I can use to achieve this ?

*Edited with more info.

1
Upload the image to blob storage, and send the URI to the image to the queue instead.Brendan Green
Should I expect blob to behave same as Queue though ? Basically if I am using Blob then do I need to use queue ?Zeus
You don't have enough information in your question about what it is you're doing, including what / how are things getting put on the queue, what process is receiving things off the queue, and what you are doing when processing the queue. If you want to notify the process that an image is ready to be processed via a queue, then writing the image to be process to blob storage, and then sending a message on the queue with a pointer to where that file is, is all I am suggesting. To clarify further, you are using both blob storage and the queue.Brendan Green

1 Answers

2
votes

Just put images on the Azure Blob Storage and create Azure Function with trigger on Blob Storage. This is intended way to do it, don't use queue what it wasn't intended for.

[FunctionName("BlobTriggerCSharp")]        
public static void Run(
     [BlobTrigger("samples-workitems/{name}")] Stream myBlob, 
     string name, 
     ILogger log)
{
    log.LogInformation($"C# Blob trigger for \n Name:{name} \n Size: {myBlob.Length} bytes");
}