Perform the following steps:
- Navigate to the Integrate tab of the RegisterUser function and click on the New Output button to add a new output binding.
- Choose Azure Queue Storage and click on Select button to add the binding and provide the values shown below and then click on Save button. Please make of the Queue name (in this case notificationqueue) which will be used in a moment.
- Navigate to the Run method of the RegisterUser function and make the following highlighted changes. We added another Queue output binding and add an empty message to trigger the Queue Trigger function. For now, we didn't add any message to the queue. We will make changes to the NotificationQueueItem.AddAsync(""); method in the upcoming recipe of the chapter.
public static async Task<IActionResult> Run(
HttpRequest req,
CloudTable objUserProfileTable,
IAsyncCollector<string> objUserProfileQueueItem,
IAsyncCollector<string> NotificationQueueItem,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string firstname=null,lastname = null;
...
...
await NotificationQueueItem.AddAsync("");
return (lastname + firstname) != null
? (ActionResult)new OkObjectResult($"Hello, {firstname + " " + lastname}")
: new BadRequestObjectResult("Please pass a name on the query" +
"string or in the request body");
}