A city inspection desk polls OCI Queue with GetMessages for new site-visit jobs. Empty replies keep the worker chatty. Which setting lets a single GetMessages wait up to thirty seconds for a message instead of returning empty right away?
Select an answer to reveal the explanation.
Short Explanation
Picture a clerk who can sit at the counter for up to half a minute instead of walking away empty-handed every second. That wait is the GetMessages polling timeout. Visibility hides work already handed out; retention is how long the ticket lives in the inbox.
Full Explanation
Long polling on GetMessages is the consume-side wait that lets a city inspection worker hold one request open for up to thirty seconds instead of hammering the queue with empty replies. OCI Queue documents a polling timeout range of 0–30 seconds with a default of 30. A value of zero is a short poll that returns immediately when the channel is empty; a positive value parks the GetMessages call until a message appears or the timeout expires. That single knob is what reduces chatty empty loops for site-visit jobs without changing how long messages live or how in-flight work is hidden.
Message retention duration fails this need by concept: it only bounds how long an undeleted message may remain in the queue before expiry. Retention protects backlog longevity; it does not make one GetMessages call wait for arrival. Visibility timeout likewise fails the empty-poll problem: it starts after a message is delivered and temporarily hides that in-flight unit from other consumers so processing can finish or the message can reappear. It never converts an empty reply into a parked wait. Dead-letter queue channel depth is about isolating poison messages after max delivery attempts; DLQ depth does not change the empty-queue polling behavior of a healthy channel.
Exam caveat: do not conflate polling timeout with visibility timeout—students often swap “wait for work” with “hide delivered work.” Operational check: in a non-production channel, issue GetMessages with polling timeout 30 against an empty queue and confirm the call blocks near thirty seconds before returning empty; then publish one job and confirm a waiting poller receives it without a busy retry loop.