1
votes

I just started to use Azure Webjobs to send email notifications about successful inspections done with a tool developed by me. The Webjob is triggered by a CloudQueueMessage sent from a controller. Basically everything is working fine so far.

But now I wonder what to do with 'Replay Function' button in the Webjobs Dashboard: I tried to use this button to replay a successful CloudQueueMessage (and therefore resend the email).
The message is added to the queue and my Webjob is triggered, but if inspecting the CloudQueueMessage, some previously set properties like Id and PopReceipt are empty. What causes this behavior?

I need the Id because in my Webjob I use 'UpdateMessage()' to set the processing state of the message.

1

1 Answers

2
votes

Replay doesn't actually enqueue a new message - it takes the json/string body of your message (shown in the Replay UI) and causes your function to be invoked via a "back channel" - the json/string data is used to construct a new queue message in memory, and this is what your function is invoked with. So only info contained in the input string in the UI will be passed to your function.

Note that before invocation, you can modify the message body. Would it be possible for you to set the bits you need before replay?