I am using NLog to log the messages in azure blob storage with blob name as dd-mm-yyyy.log. For each and every message which I inserted into "dd-mm-yyyy.log" file, I want to call/trigger the azure blob trigger function.
For Example, if I insert 3 message in one request one after the other, then azure blob trigger function should trigger 3 times. Curranty it is trigging only 1 time.
But if I insert 3 message with 1 min difference (i.e. 1 message at 1 min), then the azure blob trigger function triggering 3 times.
Below is the Nlog code:
try
{
//Some logic
}
catch (Exception ex)
{
LoggingHelper.Fatal($"Exception : {Convert.ToString(ex)}");
LoggingHelper.Fatal($"InnerException : {Convert.ToString(ex.InnerException)}");
LoggingHelper.Fatal($"Exception StackTrace: {ex.StackTrace}");
}
Azure Blob trigger code:
[FunctionName("Function1")]
public static async Task Run([BlobTrigger("poccontainer/{name}", Connection = "")] Stream myBlob, string name,
ILogger log, ExecutionContext context, BlobProperties Properties)
{
log.LogInformation($"Blob Name:{name}");
//Logic to process the file data
}
I want to trigger the azure blob trigger function every time when I insert a message into dd-mm-yyyy.log.
Solution which I tried but no use: I have added below code in the host.json file but no use.
{
"version": "2.0",
"extensions": {
"queues": {
"batchSize": 1
}
}
}
Any help is really appreciated.