The pre-v1 API

Before v1 the service had a smaller API without keys or tenants. It still works, so existing workers keep running while they move to v1, and it will be removed once nothing calls it.

How it maps onto v1

Every pre-v1 call acts in one tenant, LEGACY_TENANT (default fos), without an API key. Times in its responses are wall-clock time in LEGACY_TIMEZONE (default Europe/Amsterdam); everything is stored in UTC.

Pre-v1 v1 successor Differences
POST /queues/{name}/messages POST /v1/queues/{queue}/messages deduplication: true uses a top-level body.uuid as the dedup_key
GET /queues/{name}/next?consumer= POST /v1/queues/{queue}/claims no receipt is returned; restrictByVpn=1&vpn_id= is the claim's route
POST /messages/{id}/ack POST /v1/messages/{id}/ack no receipt needed; accepted while the message is processing
POST /messages/{id}/reject POST /v1/messages/{id}/fail is_fatal is permanent; max_retries per call is still honoured, capped by the queue's max_attempts_limit
GET /queues/{name}/stats GET /v1/queues/{queue} counts per status only
/dashboard/... /v1/queues, /v1/queues/{queue}/messages, /v1/messages/{id}, .../replay pause and resume are PATCH /v1/queues/{queue} with paused

Everything the server decides is the same for both: leases (from the queue's lease_seconds), expired leases counting as attempts, backoff, the dead-letter set, routes and retention all follow the queue settings.

Seeing when it is no longer used

Every pre-v1 response carries

Deprecation: @1795132800
Link: </v1/...>; rel="successor-version"

and every call is counted per route in dbqueue_legacy_requests_total{route="..."} on /metrics. When increase(dbqueue_legacy_requests_total[7d]) is zero for every route, nothing uses the pre-v1 API any more.

Removing it

  1. Confirm the counter has been flat long enough to cover every scheduled job.
  2. Delete QueueController, MessageController and DashboardController (pre-v1), LegacyUsage, LegacyDeprecationListener and the restrictByVpn translation in QueueService::claimNext.
  3. Drop the pre-v1 compatibility in storage with a new migration: the old Redis pause keys, the consumed_by_vpn column, and the fos default on messages.tenant_id.