exam questions

Exam AZ-300 All Questions

View all questions & answers for the AZ-300 exam

Exam AZ-300 topic 5 question 9 discussion

Actual exam question from Microsoft's AZ-300
Question #: 9
Topic #: 5
[All AZ-300 Questions]

HOTSPOT -
You are developing a SMS-based testing solution. The solution sends users a question by using SMS. Early responders may qualify for prizes.
Users must respond with an answer choice within 90 seconds. You must be able to track how long it takes each user to respond. You create a durable Azure
Function named SendSmsQuizQuestion that uses Twilio to send messages.
You need to write the code for MessageQuiz.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer: Explanation

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
simonxinyu
Highly Voted 5 years, 4 months ago
https://www.examtopics.com/exams/microsoft/az-202/view/7/
upvoted 39 times
...
Atef
Highly Voted 5 years, 5 months ago
Box 1 should be DateTime expiration = context.CurrentUtcDateTime.AddSeconds(90); Box 2 Should be var timeoutTask = context.CreateTimer(expiration, cts.Token);
upvoted 21 times
tartar
4 years, 9 months ago
Box 1: DateTime expiration = context.CurrentUtcDateTime.AddSeconds(90); Box 2: var timeoutTask = context.CreateTimer(expiration, cts.Token); Box 3: if(!timeoutTask.IsCompleted)
upvoted 3 times
...
...
BEB
Most Recent 4 years, 10 months ago
See https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp scroll down to function workflow.. Good read.. If you are just looking for answers: (by examt topics) Box 1: DateTime expiration = context.CurrentUtcDateTime.AddSeconds(90); The user has 90 seconds to respond with the code they received in the SMS message. Box 2:var timeoutTask = context.CreateTimer(expiration, cts.Token); Create a timer. Box 3: if(!timeoutTask.IsCompleted) All pending timers must be complete or canceled before the function exits.
upvoted 2 times
...
dips31089
4 years, 10 months ago
Box 1 --- DateTime expiration = context.CurrentUtcDateTime.AddSeconds(90); You cant use datetime.now directly but should rather use the datetime within the context. Box 2 --- timeoutTask = context.CreateTimer(expiration, cts.Token) cts variable used here is a giveaway. :)
upvoted 3 times
...
kk1
4 years, 11 months ago
https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-phone-verification?tabs=csharp
upvoted 1 times
...
jonnybugaloo
4 years, 12 months ago
https://www.examtopics.com/assets/media/exam-media/02522/0013800001.png
upvoted 8 times
...
Prash85
4 years, 12 months ago
Box 1 should be DateTime expiration = context.CurrentUtcDateTime.AddSeconds(90); Box 2 Should be var timeoutTask = context.CreateTimer(expiration, cts.Token);
upvoted 3 times
...
cacasodo
5 years, 1 month ago
This article provides some understanding as well: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-timers?tabs=csharp
upvoted 1 times
...
tboggie
5 years, 1 month ago
Would this type of question come up in the exam? Doesn't look like an AZ-300 question.
upvoted 11 times
tmurfet
5 years ago
One or two I think -- a requirement for a solution architect to be able to have enough knowledge to read code enough to communicate with DevOps. The answer is in the question if you look for it. In this case the variable cts is a tell for the answer in the second box.
upvoted 3 times
...
...
DP80
5 years, 1 month ago
The following code implements a similar functionality => https://github.com/Azure/azure-functions-durable-extension/blob/master/samples/precompiled/PhoneVerification.cs
upvoted 6 times
praveen97
4 years, 11 months ago
Good article.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...