SERVER BLOCK / QUEUE

Publish durable work

A View sends a JSON event to a server handler. The handler uses a server-only Queue connection and returns the provider receipt.

LIVE VIEW + SERVER

Publish an application event

The Queue connection and credentials never leave the server. The View only submits event data and receives ok plus messageId.

Message

Receipt: {lastId}

BEFORE YOU CLICK

Local development uses Dowe and targets an existing queue. On deploy, the same handler can select RabbitMQ, Cloudflare, or Vercel through its server-only connection; provision the remote queue before publishing.

dowe
dowe queue init dowe-docs
dowe queue declare dowe-docs docs-events

SOURCE FILES

Explicit connection, explicit destination

The application publishes to a queue that was already provisioned. Consume, ACK, and NACK stay in the streaming Rust provider API.

dowe
signal eventForm value:{ event:"docs.started" message:"Dowe server block" }

fn publishEvent
  request result method:"POST" route:"/api/examples/queue" body:eventForm
  if result.ok
    set lastId value:result.messageId

Button onClick:publishEvent
  "Publish event"