{"record":{"id":"3e729e247af32773","repo":"hcengineering/platform","slug":"please-provide-queue-config","errorCode":null,"errorMessage":"Please provide queue config","messagePattern":"Please provide queue config","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pods/server/src/__start.ts","lineNumber":39,"sourceCode":"  type WorkspaceStatistics\n} from '@hcengineering/server-core'\nimport serverNotification from '@hcengineering/server-notification'\nimport { storageConfigFromEnv } from '@hcengineering/server-storage'\nimport serverToken from '@hcengineering/server-token'\nimport { join } from 'path'\nimport { start } from '.'\nimport { profileStart, profileStop } from './profiler'\n\nconfigureAnalytics('server', process.env.VERSION ?? '0.7.0')\nAnalytics.setTag('application', 'transactor')\n\nlet getStats: () => WorkspaceStatistics[] = () => {\n  return []\n}\n\nconst queueConfig = process.env.QUEUE_CONFIG\nif (queueConfig === undefined) {\n  throw new Error('Please provide queue config')\n}\n\nconst queue = getPlatformQueue('transactor')\n\nvoid queue.createTopics(10).catch((err) => {\n  console.error('Failed to create required topics', err)\n})\n\n// Force create server metrics context with proper logging\nconst metricsContext = initStatisticsContext('transactor', {\n  getStats: (): WorkspaceStatistics[] => {\n    return getStats()\n  },\n  factory: () =>\n    createOpenTelemetryMetricsContext(\n      'server',\n      {},\n      {},","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/pods/server/src/__start.ts#L21-L57","documentation":"The server bootstrap (__start.ts) requires a queue configuration to connect to the platform queue (Kafka etc.) via getPlatformQueue. If the QUEUE_CONFIG environment variable is not set, startup is aborted immediately with this error so the transactor does not run without its message queue.","triggerScenarios":"Starting the server pod without QUEUE_CONFIG defined in the environment — missing entry in k8s Deployment env, secrets not mounted, docker run without -e QUEUE_CONFIG, or running the script locally without a .env.","commonSituations":"Fresh local setup missing the sample env, CI forgetting to inject secrets, renaming of the env var in a new release, secrets manager outage yielding empty env.","solutions":["Set QUEUE_CONFIG in the environment before starting (e.g. export QUEUE_CONFIG='kafka://localhost:9092' or the URI/format your deployment expects).","Check your k8s/docker deployment env and secrets references actually resolve for this pod.","Compare with docs/examples for the expected QUEUE_CONFIG format for your platform version.","If it should be optional in dev, run the server via a configured .env / docker-compose that defines it."],"exampleFix":"// before\nnpm start\n// after\nexport QUEUE_CONFIG='kafka://localhost:9092'\nnpm start","handlingStrategy":"validation","validationCode":"if (!process.env.QUEUE_CONFIG) {\n  throw new Error('QUEUE_CONFIG must be set before starting the server')\n}","typeGuard":"function hasQueueConfig(env: NodeJS.ProcessEnv): env is NodeJS.ProcessEnv & { QUEUE_CONFIG: string } {\n  return typeof env.QUEUE_CONFIG === 'string' && env.QUEUE_CONFIG.length > 0\n}","tryCatchPattern":"try {\n  await startServer()\n} catch (err) {\n  if (/queue config/i.test(err.message)) {\n    console.error('QUEUE_CONFIG is missing; set it in env/secrets and restart')\n    process.exit(1)\n  }\n  throw err\n}","preventionTips":["Define QUEUE_CONFIG in deployment manifests/secrets and validate at pod start.","Keep an .env.example documenting required env vars.","Fail fast in CI with an env-var presence check.","Use startup health checks that catch missing config."],"tags":["config","environment","queue","startup"],"backgroundTag":"missing-env-var","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}