Local development with pushq dev
pushq dev runs the real queue locally: delays, retries and rate limits behave exactly as they do in production, instead of being faked with synchronous calls.
pushq devThat gives you SQLite in a temp file, no authentication, fast timers, and the dashboard at http://localhost:8080/. Install pushq first if you don’t have the binary.
Point an SDK at your local server
Section titled “Point an SDK at your local server”SDKs default to the hosted API, so pass your local server’s URL. pushq dev doesn’t check API keys.
import { Pushq } from "pushq";
const pq = new Pushq({ baseUrl: "http://localhost:8080" });from pushq import Pushq
pq = Pushq("http://localhost:8080")pq := pushq.New("http://localhost:8080", "") // empty key: no Authorization headerPushq pq = Pushq.builder() .baseUrl("http://localhost:8080") .build();using var pq = new PushqClient("http://localhost:8080");export PUSHQ_URL="http://localhost:8080"Try it with curl
Section titled “Try it with curl”# Create a queue that delivers to a receiver on port 9000curl -X PUT localhost:8080/v1/queues/emails -d '{ "rate_limits": {"max_dispatches_per_second": 5}, "retry": {"max_attempts": 5, "min_backoff_seconds": 1, "max_backoff_seconds": 60}, "target": {"base_url": "http://localhost:9000"}}'
# Deliver nowcurl -X POST localhost:8080/v1/queues/emails/tasks -d '{ "path": "/send", "json_body": {"to": "a@example.com"}}'
# In 2 hours, deduplicated, with a per-task retry overridecurl -X POST localhost:8080/v1/queues/emails/tasks -d '{ "path": "/send", "json_body": {"to": "b@example.com"}, "delay_seconds": 7200, "task_id": "welcome-user-42", "retry": {"max_attempts": 1}}'A second create with the same task_id returns 409 already_exists; that’s your deduplication.
For a receiver, the repository has an Express example and a FastAPI example, both of which verify signatures.
Watch and operate local queues
Section titled “Watch and operate local queues”curl localhost:8080/v1/queues/emails/statscurl "localhost:8080/v1/queues/emails/tasks?state=succeeded"curl localhost:8080/v1/queues/emails/tasks/welcome-user-42/attempts
curl -X POST localhost:8080/v1/queues/emails:pausecurl -X POST localhost:8080/v1/queues/emails:resumecurl -X POST localhost:8080/v1/queues/emails:purgecurl -X POST localhost:8080/v1/queues/emails/tasks/welcome-user-42:run # dispatch nowEvery server also serves its interactive API reference at /docs (http://localhost:8080/docs) and the OpenAPI spec at /openapi.json.
Read more
Section titled “Read more”- Quickstart: the same flow against the hosted API.
- Install pushq: binaries, Docker and building from source.
- Configuration: every setting for
pushq serve.