AZ-204 Connect to and consume services

Your compliance system enqueues audit records onto an Azure Storage queue. Each record must remain in the queue until a separate retention job deletes it, however long that takes. Which messagettl value should the producer send on Put Message?

Show answer and explanation

Answer: D

For storage service API version 2017-07-29 and later, a messagettl value of -1 tells the queue that the message never expires. Any positive number of seconds is also accepted and sets a custom lifetime. Leaving messagettl out is not the same as requesting an unlimited lifetime, because the queue then applies a default of seven days, after which the message is removed. The producer should therefore send -1 explicitly.

Why the other options are wrong

  • A. 3600 seconds is one hour. The message would expire after an hour, which would remove audit records long before the retention job runs.
  • B. 86400 seconds is one day. A finite lifetime of this length would discard the records after twenty-four hours, so this value does not meet the requirement.
  • C. 604800 seconds equals seven days, which matches the queue default. The records would still expire after a week, so this is not a permanent setting.

Keep going. 230 AZ-204 questions, answers explained after each one.

Practise this domain

Reviewed November 2026. Spotted a problem with this question? Report it from the practice tool.