{"record":{"id":"33fe72011707b8c8","repo":"apache/druid","slug":"cannot-set-kafka-property-group-id-property-is","errorCode":null,"errorMessage":"Cannot set kafka property [group.id]. Property is randomly generated for you. Found [%s]","messagePattern":"Cannot set kafka property \\[group\\.id\\]\\. Property is randomly generated for you\\. Found \\[(.+?)\\]","errorType":"validation","errorClass":"org.apache.druid.java.util.common.IAE","httpStatus":null,"severity":"error","filePath":"extensions-core/kafka-extraction-namespace/src/main/java/org/apache/druid/query/lookup/KafkaLookupExtractorFactory.java","lineNumber":394,"sourceCode":"    return doubleEventCount;\n  }\n\n  ListenableFuture<?> getFuture()\n  {\n    return future;\n  }\n\n  /**\n   * Check that the user has not set forbidden Kafka consumer props\n   *\n   * Some consumer properties must be set in order to guarantee that\n   * the consumer will consume the entire topic from the beginning.\n   * Otherwise, lookup data may not be loaded completely.\n   */\n  private void verifyKafkaProperties()\n  {\n    if (kafkaProperties.containsKey(ConsumerConfig.GROUP_ID_CONFIG)) {\n      throw new IAE(\n              \"Cannot set kafka property [group.id]. Property is randomly generated for you. Found [%s]\",\n              kafkaProperties.get(ConsumerConfig.GROUP_ID_CONFIG)\n      );\n    }\n    if (kafkaProperties.containsKey(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)) {\n      throw new IAE(\n              \"Cannot set kafka property [auto.offset.reset]. Property will be forced to [earliest]. Found [%s]\",\n              kafkaProperties.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)\n      );\n    }\n    if (kafkaProperties.containsKey(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG) &&\n          !kafkaProperties.get(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG).equals(\"false\")) {\n      throw new IAE(\n          \"Cannot set kafka property [enable.auto.commit]. Property will be forced to [false]. Found [%s]\",\n          kafkaProperties.get(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG)\n      );\n    }\n    Preconditions.checkNotNull(","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/kafka-extraction-namespace/src/main/java/org/apache/druid/query/lookup/KafkaLookupExtractorFactory.java#L376-L412","documentation":"verifyKafkaProperties() rejects a user-supplied group.id because the factory generates a unique random consumer group id for each lookup; allowing a fixed group.id would cause offset tracking conflicts between lookup consumers.","triggerScenarios":"Calling start() (which invokes verifyKafkaProperties) when the kafkaProperties map contains the key 'group.id'.","commonSituations":"Copy-pasting a plain Kafka consumer config (which requires group.id) into a Druid kafka lookup spec.","solutions":["Remove the group.id entry from kafkaProperties in the lookup spec","Let Druid generate the group id automatically"],"exampleFix":"// before\n\"group.id\": \"my-lookup-group\"\n// after\n(removed; Druid generates group.id internally)","handlingStrategy":"validation","validationCode":"if (kafkaProperties.containsKey(\"group.id\")) {\n  throw new IllegalArgumentException(\"Remove group.id; Druid generates it\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never copy plain Kafka consumer configs into lookup specs","Strip group.id/auto.offset.reset/enable.auto.commit keys programmatically before start","Validate lookup specs in CI"],"tags":["kafka","config","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}