Practice Exam

Question 47 of 75

Analyze Queue-Triggered Azure Function Code

You work as a Serverless Application Developer for MDFT Pro, a well-known training agency that delivers certification courses to students worldwide. Mark, the Integration Solutions Architect, has developed an order processing system where the Student Enrollment Portal web application places course enrollment orders into an Azure Storage Queue named “incoming-orders”. You’re reviewing an Azure Function App that processes these orders and stores them in Azure Table Storage for reporting and analytics. The function is triggered by the queue and uses Visual Studio for development.

public static class OrderProcessor
{
	[FunctionName("ProcessOrders")]
	public static void ProcessOrders(
		[QueueTrigger("incoming-orders")] CloudQueueMessage item,
		[Table("Orders")] ICollector<Order> tableBindings,
		TraceWriter log)
	{
		log.Info($"Order: {item.Id}");
		log.Info($"Insertion Time: {item.InsertionTime}");
		log.Info($"Expiration Time: {item.ExpirationTime}");
		tableBindings.Add(JsonConvert.DeserializeObject<Order>(item.AsString));
	}
}

Which three statements correctly describe the behavior of this Azure Function code?

Choose all correct answers from the options below.

Explanations for each answer:

Learn more about Queue Triggers:
Storage Queue Triggers
Next Question
Discuss this question on social media: