{"record":{"id":"e141bdb000b056bb","repo":"quickwit-oss/quickwit","slug":"quickwit-was-compiled-without-the-kafka-feature","errorCode":null,"errorMessage":"Quickwit was compiled without the `kafka` feature","messagePattern":"Quickwit was compiled without the `kafka` feature","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-indexing/src/source/mod.rs","lineNumber":466,"sourceCode":"            Ok(())\n        }\n        #[allow(unused_variables)]\n        SourceParams::File(FileSourceParams::Notifications(FileSourceNotification::Sqs(\n            sqs_config,\n        ))) => {\n            #[cfg(not(feature = \"sqs\"))]\n            anyhow::bail!(\"Quickwit was compiled without the `sqs` feature\");\n\n            #[cfg(feature = \"sqs\")]\n            {\n                queue_sources::sqs_queue::check_connectivity(&sqs_config.queue_url).await?;\n                Ok(())\n            }\n        }\n        #[allow(unused_variables)]\n        SourceParams::Kafka(params) => {\n            #[cfg(not(feature = \"kafka\"))]\n            anyhow::bail!(\"Quickwit was compiled without the `kafka` feature\");\n\n            #[cfg(feature = \"kafka\")]\n            {\n                kafka_source::check_connectivity(params.clone()).await?;\n                Ok(())\n            }\n        }\n        #[allow(unused_variables)]\n        SourceParams::Kinesis(params) => {\n            #[cfg(not(feature = \"kinesis\"))]\n            anyhow::bail!(\"Quickwit was compiled without the `kinesis` feature\");\n\n            #[cfg(feature = \"kinesis\")]\n            {\n                kinesis::check_connectivity(params.clone()).await?;\n                Ok(())\n            }\n        }","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-indexing/src/source/mod.rs#L448-L484","documentation":"check_source_connectivity validates that a Kafka source can reach its brokers, but the binary was built without the `kafka` cargo feature, so the Kafka source implementation (and its connectivity check) is not compiled in. The function bails immediately when SourceParams::Kafka is matched under `#[cfg(not(feature = \"kafka\"))]`. This is a compile-time feature gating error, not a runtime network problem.","triggerScenarios":"Calling check_source_connectivity (directly or via add_source, update_source, or the test-connectivity REST endpoint) with a source whose SourceParams is Kafka while the running Quickwit binary was compiled without `--features kafka`.","commonSituations":"Running a slim/distroless Quickwit build or official binary without kafka feature enabled; a custom build omitting the feature; a source config referencing Kafka in an index.yaml applied to a feature-stripped deployment.","solutions":["Rebuild Quickwit with the kafka feature enabled, e.g. `cargo build --features kafka` (or use a release binary built with it).","If Kafka is not intended, change or remove the Kafka source from the index configuration.","Verify the deployed binary supports Kafka before adding the source (check build features or docs)."],"exampleFix":"// before (build without feature)\ncargo build --release\n// after\ncargo build --release --features kafka","handlingStrategy":"validation","validationCode":"// Check build features before configuring a Kafka source\nif !quickwit_build_has_feature(\"kafka\") {\n    return Err(anyhow::anyhow!(\"binary lacks `kafka` feature; rebuild with --features kafka\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match deployment build features to the source types in your index configs.","Lint index configs against a manifest of enabled features at deploy time.","Use official binaries built with the required source features."],"tags":["kafka","compile-time-feature","source-connectivity","rust"],"backgroundTag":"missing-optional-dependency","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}