quickwit-oss/quickwit · error
GCP PubSub subscription `{subscription_name}` does not exist
Error message
GCP PubSub subscription `{subscription_name}` does not exist What it means
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.
Source
Thrown at quickwit/quickwit-indexing/src/source/gcp_pubsub_source.rs:138
}
let client = Client::new(client_config)
.await
.context("failed to create GCP PubSub client")?;
let subscription = client.subscription(&subscription_name);
// TODO: replace with "<node_id>/<index_id>/<source_id>/<pipeline_ord>"
let partition_id = append_random_suffix(&format!("gpc-pubsub-{subscription_name}"));
let partition_id = PartitionId::from(partition_id);
info!(
index_id=%source_runtime.index_id(),
source_id=%source_runtime.source_id(),
subscription=%subscription_name,
max_messages_per_pull=%max_messages_per_pull,
"starting GCP PubSub source"
);
if !subscription.exists(Some(RetrySetting::default())).await? {
anyhow::bail!("GCP PubSub subscription `{subscription_name}` does not exist");
}
Ok(Self {
source_runtime,
subscription_name,
subscription,
state: GcpPubSubSourceState::default(),
backfill_mode_enabled,
partition_id,
max_messages_per_pull,
})
}
fn should_exit(&self) -> bool {
self.backfill_mode_enabled && self.state.num_consecutive_empty_batches >= 10
}
}
#[async_trait]View on GitHub (pinned to a39730c5cd)
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.
Example fix
// before subscription: my-subscritpion // after gcloud pubsub subscriptions describe my-subscription --project=my-project # then fix the config subscription: my-subscription
Defensive patterns
Strategy: validation
Validate before calling
gcloud pubsub subscriptions describe $SUBSCRIPTION --project=$PROJECT >/dev/null && echo OK || echo 'subscription missing'
Try / catch
// catch and surface a config hint
if err.to_string().contains("does not exist") {
tracing::error!(%subscription_name, "fix the subscription name or project in the source config");
} Prevention
- Create the subscription before wiring the Quickwit source.
- Use fully-qualified subscription references to avoid project ambiguity.
- Verify service-account permissions (pubsub.subscriber) beforehand.
When it happens
Trigger: `GcpPubSubSource::try_new` is called with a subscription name whose `exists(Some(RetrySetting::default())).await` check returns `false`.
Common situations: Typo in the subscription or project ID in the source config; subscription deleted in GCP console; credentials pointing at the wrong GCP project.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- unknown URI protocol `{protocol}`
- topic `{}` does not exist
- failed to parse Kafka client log level. value `{}` is not su
- failed to parse Kafka client parameters. `client_params` mus
- failed to parse Kafka client parameters. `client_params.{}`
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/5952fa29442f0072.
Report an issue: GitHub.