quinzee.cloud

Development edition · 16 November 2026. Commands using repository paths, Make targets or sample projects require access to the Quinzee source checkout. No public installer is available. Examples use disposable local environments.

Developer’s guide

7. Process work with Queue Storage

Queue messages tell a worker that there is something to do. Store the document in Blob Storage and put its name in the message instead of copying a large payload into the queue. The template created a documents queue; the sample below uses a separate book-work queue so it does not consume application work.

Step 1: send, peek, receive and acknowledge

Replace Program.cs and run dotnet run --no-restore:

using Azure.Storage.Queues;
using Azure.Storage.Queues.Models;
using System.Text.Json;

var book = BookContext.Load();
var outputs = book.Outputs();
var queue = new QueueClient(
    new Uri(new Uri(outputs["queueEndpoint"]), "book-work"), book.Credential,
    new QueueClientOptions { MessageEncoding = QueueMessageEncoding.Base64 });
await queue.CreateIfNotExistsAsync();
await queue.SendMessageAsync(JsonSerializer.Serialize(new { blob = "hello.txt" }));

var peek = await queue.PeekMessagesAsync(maxMessages: 1);
Console.WriteLine($"Messages visible to peek: {peek.Value.Length}");
var received = await queue.ReceiveMessagesAsync(
    maxMessages: 1, visibilityTimeout: TimeSpan.FromSeconds(30));
foreach (var message in received.Value)
{
    using var work = JsonDocument.Parse(message.Body.ToString());
    Console.WriteLine($"Process blob: {work.RootElement.GetProperty("blob").GetString()}");
    // Perform and durably record the application operation before acknowledging.
    await queue.DeleteMessageAsync(message.MessageId, message.PopReceipt);
}

Peek inspects a message without claiming it. Receive makes it invisible to other consumers for the visibility period and returns a pop receipt. Deleting with that receipt acknowledges successful processing.

Step 2: handle slow work and redelivery

If processing takes longer, renew the visibility period and retain the new receipt. Inside the receive loop, before deletion, the operation looks like:

var renewed = await queue.UpdateMessageAsync(
    message.MessageId, message.PopReceipt, message.Body.ToString(),
    TimeSpan.FromMinutes(1));
await queue.DeleteMessageAsync(message.MessageId, renewed.Value.PopReceipt);

Use this in place of the original delete, not after it. Updating or receiving a message rotates its receipt; an old receipt fails. If a worker exits before acknowledgement, the message becomes visible again after the lease expires. Queue state, visibility deadlines and dequeue counts survive cloud restart.

This is at-least-once delivery. Use an application work ID and an idempotent write, such as a database uniqueness constraint, to avoid processing the same business operation twice. There is no automatic exactly-once transaction across Queue, Blob, SQL and Redis. A repeatedly failing message needs an application retry/dead-letter policy; Quinzee does not move it automatically.

Step 3: understand capacity

The message text limit is 64 KiB after Base64 encoding; encoding reduces the raw payload you can fit. The default TTL is seven days. Receives accept 1–32 messages and a positive visibility period; visibility is bounded to seven days. The local capacity is 1,024 queues per account and 1,024 messages per queue, with a 16 MiB serialized queue-file limit. Capacity failures are explicit.

Use QHQ Storage → Queues to inspect queues and peek without consuming messages. Its approximate message count is not a guarantee that a receive will find work at that instant. The platform's sampled queue gauges are also not a complete inventory when their truncation indicator is set.