{"record":{"id":"5952fa29442f0072","repo":"quickwit-oss/quickwit","slug":"gcp-pubsub-subscription-subscription-name-does","errorCode":null,"errorMessage":"GCP PubSub subscription `{subscription_name}` does not exist","messagePattern":"GCP PubSub subscription `(.+?)` does not exist","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-indexing/src/source/gcp_pubsub_source.rs","lineNumber":138,"sourceCode":"        }\n\n        let client = Client::new(client_config)\n            .await\n            .context(\"failed to create GCP PubSub client\")?;\n        let subscription = client.subscription(&subscription_name);\n        // TODO: replace with \"<node_id>/<index_id>/<source_id>/<pipeline_ord>\"\n        let partition_id = append_random_suffix(&format!(\"gpc-pubsub-{subscription_name}\"));\n        let partition_id = PartitionId::from(partition_id);\n\n        info!(\n            index_id=%source_runtime.index_id(),\n            source_id=%source_runtime.source_id(),\n            subscription=%subscription_name,\n            max_messages_per_pull=%max_messages_per_pull,\n            \"starting GCP PubSub source\"\n        );\n        if !subscription.exists(Some(RetrySetting::default())).await? {\n            anyhow::bail!(\"GCP PubSub subscription `{subscription_name}` does not exist\");\n        }\n        Ok(Self {\n            source_runtime,\n            subscription_name,\n            subscription,\n            state: GcpPubSubSourceState::default(),\n            backfill_mode_enabled,\n            partition_id,\n            max_messages_per_pull,\n        })\n    }\n\n    fn should_exit(&self) -> bool {\n        self.backfill_mode_enabled && self.state.num_consecutive_empty_batches >= 10\n    }\n}\n\n#[async_trait]","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-indexing/src/source/gcp_pubsub_source.rs#L120-L156","documentation":"While initializing the GCP PubSub source, `try_new` verifies the configured subscription actually exists via `subscription.exists(...)`. If the check returns false, source creation fails because the subscription cannot be polled.","triggerScenarios":"`GcpPubSubSource::try_new` is called with a subscription name whose `exists(Some(RetrySetting::default())).await` check returns `false`.","commonSituations":"Typo in the subscription or project ID in the source config; subscription deleted in GCP console; credentials pointing at the wrong GCP project.","solutions":["Verify the subscription exists: `gcloud pubsub subscriptions list --project=<project>` and correct the name in the source config.","Check that the configured project ID matches the project hosting the subscription.","Confirm credentials (GOOGLE_APPLICATION_CREDENTIALS) grant pubsub.viewer/subscriber access to the subscription."],"exampleFix":"// before\nsubscription: my-subscritpion\n// after\ngcloud pubsub subscriptions describe my-subscription --project=my-project\n# then fix the config\nsubscription: my-subscription","handlingStrategy":"validation","validationCode":"gcloud pubsub subscriptions describe $SUBSCRIPTION --project=$PROJECT >/dev/null && echo OK || echo 'subscription missing'","typeGuard":null,"tryCatchPattern":"// catch and surface a config hint\nif err.to_string().contains(\"does not exist\") {\n    tracing::error!(%subscription_name, \"fix the subscription name or project in the source config\");\n}","preventionTips":["Create the subscription before wiring the Quickwit source.","Use fully-qualified subscription references to avoid project ambiguity.","Verify service-account permissions (pubsub.subscriber) beforehand."],"tags":["gcp","pubsub","resource-not-found","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}