app.nzapp
AppsProjectsReposPullsChatIntegrationsGatewayModelsEvalsToolsDatasetsMCPDeploysPricingBlogDocsAssistantsCharactersArtMusic
Sign inStart building
Agent stack
Cloud coding agentAgents SDKIntegrationsBrowser agentMonitors & auto-agentsSchedulersAgent skillsMCP serversDeep research
Models & API
AI GatewayModel catalogModel evalsModel spacesPlaygroundText to imageImage to 3DText to 3DMusic & SFXAudio editorMedia optimizerAI art & libraryChatAPI referenceSchemaBecome a provider
Compute & hosting
DeploysAddonsPostgres hostinggobed vector searchSite hostingAnalyticsCog GPU hostingRL trainingBuilds & CIWorkersTask queuesDomainsGit hosting
Tools
AI toolsDrawDiffusion canvasLive DrawWriteSheetsArtifactsVideo studioNotebooksDatasets
Learn
DocsBlogEval guidesPrompt libraryCLIAlternativesPapersAI charactersArt gallerySecurityConsulting
Company
PricingEnterpriseSettingsBillingStatusInvestorsCreate accountTerms of ServicePrivacy Policy
app.nzapp.nz

AI agent cloud for coding, deploys, model routing, and research. Built for teams shipping software.

Built in New Zealand by App AI NZ.

Social
X / TwitterGitHubYouTube
The app.nz network
GpuBrainPapersReading TimemojojojoNetwrckText-Generator.ioCodex InfinityOpenPathsCuteDSLAI Art GeneratorAIArt-Generator.artSiteSimSimplexGenDictatorFlowWebFiddleRing.nzChatGibidyBitBankExperimentFlowEvangelerHires.nzHow.nzV5 GamesAddicting Word GamesBig Multiplayer ChessWord SmashingreWord GameMultiplication Master
© 2026 App AI NZ Ltd. All rights reserved.All systems normalTermsPrivacy
Blog
July 7, 2026·5 min read·app.nz

Queues, visibility timeouts, and dead messages

The queue primitive behind app.nz background work: receive as a lease, ack on success, retry after visibility timeout, and move poison messages to dead state.

Listen to this article

On-device voice

Uses the voice built into your browser; no article text leaves this page.

Audio narration is not supported by this browser.

Queues are the quiet infrastructure behind agents, schedulers, and background work. app.nz queues follow the familiar SQS-shaped model: send a message, receive it with a lease, ack it when done, and retry it if the worker disappears.

The important concept is visibility timeout.

Receive is a lease

When a worker receives a message, the queue does not delete it. It hides the message until the visibility timeout expires. If the worker finishes, it acks the message and the row is removed. If the worker dies, the message becomes visible again.

That gives background work a basic recovery story without requiring every worker to implement its own retry table.

Max receives and dead messages

Some jobs will never succeed. A bad payload, missing secret, or broken downstream API should not retry forever. app.nz queues track receive count and move a message to dead state after the configured max receives.

Dead messages are not success. They are preserved failure. The operator can inspect them, fix the cause, and decide whether to replay.

Queue stats

A useful queue needs visible counters:

  • total,
  • visible,
  • in flight,
  • dead.

Those numbers tell you whether workers are keeping up, whether jobs are stuck, and whether retries are turning into poison messages.

Dispatch modes

Some queues are plain application queues. Others dispatch into app.nz systems such as agents. The queue record can carry dispatch configuration so a message becomes a task for the right subsystem.

That keeps the primitive general while still letting product features build on it.

Why not just run cron plus HTTP?

HTTP is a poor durability layer. If a worker request fails halfway through a long job, the caller may not know whether it should retry. A queue gives the job an identity and a state.

For agents, this matters because a single job can outlive a browser tab. For media tasks, it matters because a model run may take minutes. For CI, it matters because capacity may be temporarily unavailable.

The invariant

Every background job should be in exactly one of these states:

visible leased done dead

Once that invariant exists, features can share the same operational vocabulary. "Why did my task not run?" becomes answerable from queue state instead of logs alone.

Build what you just read

Ship agents, models, and apps on one cloud.

Start with free credits, then use the same platform from the web app, CLI, desktop app, or MCP.

Start building freeRead the docs

Keep reading

How coding agents become durable worker jobs

A coding-agent prompt becomes a stored task, a leased worker job, an event stream, and durable artifacts instead of a long HTTP request that disappears on failure.

Run cloud agent tasks on your own computers with app worker

Fire an agent task from your phone and let your desktop code it: app worker turns any machine you own into a private, user-scoped worker with local engines — our codex fork (mainline fallback), claude, cursor-agent, gemini, grok.

The next ten years: minds as products, machine-speed markets, and why big labs are the new big tech

A ten-year thesis: AI minds with personality and skills become a product category, robots become software subscriptions, marketplaces go high-frequency and low-fee, humans and governments get augmented, and vertically integrated labs become the new big tech — with sources, and the app.nz strategy behind it.