I am trying to do some logging for a triggered message(queue), so that if a message fails and it gets picked up by the webjob next time I would have logged some information so that I wouldn't redo the success paths(like sending messages to clients after stage1). So I plan on using the azure blob storage binding to configure as input and output streams. But in order to do it i need a unique name for the blob. I have a guid inside the message and i plan on using that guid to read/write from the blob storage. How do i configure this blob storage name binding dynamically from a guid field inside the queue message. (My message is very big and i don't want to use the entire message as a blob storage name).
public static void ProcessQueueMessage([QueueTrigger("%testQueue%")],
TestMessageModel testMessage,
[Blob("testStorage/{queueTrigger}", FileAccess.ReadWrite)] Stream logstream)
{
}
As you can see, the official documentation only uses queueTrigger that uses the string inside the message as the blob name. But my message looks big like this
public class TestMessageModel
{
public Guid Id {get; set;}
public int FromOrg {get; set;}
public DateTime BatchDate {get; set;}
public Payments[] payments {get; set;} // this array is big (many items)
}
I don't want to use something that ridiculous as a blob name. how to use the Id inside the testMessage?