Skip to content

Kafka consumer group.id does not default to quarkus.application.name in production #50244

@lberrymage

Description

@lberrymage

Describe the bug

According to the Kafka consumer group documentation:

If the group.id attribute is not set, it defaults the quarkus.application.name configuration property.

This is also stated in the incoming channel configuration documentation for group.id:

If not set, defaults to the application name as set by the quarkus.application.name configuration property.

This is true in dev mode. However, this is not true when running an application in production mode, and a randomly generated UUID is used as the consumer group ID instead.

Expected behavior

When quarkus.application.name is set, Kafka consumer group.ids should default to it when running an application in production mode as implied in the documentation.

Actual behavior

Even when quarkus.application.name is set, Kafka consumer group.ids are set to randomly generated UUIDs when running the application in production mode.

How to Reproduce?

Reproducer: https://github.com/lberrymage/quarkus-kafka-group-id-issue-reproducer (or ZIP)

Steps to reproduce:

  1. Run ./mvnw quarkus:dev.
  2. Note the consumer group described in the logs, e.g., com.example.application in INFO [io.sma.rea.mes.kafka] (smallrye-kafka-consumer-thread-0) SRMSG18257: Kafka consumer kafka-consumer-words-in, connected to Kafka brokers 'OUTSIDE://localhost:32837', belongs to the 'com.example.application' consumer group and is configured to poll records from [words].
  3. Run ./mvnw package && ./mvnw quarkus:run (no Kafka container necessary).
  4. Note the consumer group described in the logs, e.g., 941eabda-f8b3-411a-8e81-1a3488614b75 in INFO [io.sma.rea.mes.kafka] (smallrye-kafka-consumer-thread-0) SRMSG18257: Kafka consumer kafka-consumer-words-in, connected to Kafka brokers 'localhost:9092', belongs to the '941eabda-f8b3-411a-8e81-1a3488614b75' consumer group and is configured to poll records from [words].

The consumer group in step 2 will be com.example.application (the value of quarkus.application.name), while the group in step 4 will be a randomly generated UUID.

Output of uname -a or ver

Linux hostname 6.10.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 10 Sep 2024 14:37:32 +0000 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.8" 2025-07-15 LTS
OpenJDK Runtime Environment Temurin-21.0.8+9 (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.8+9 (build 21.0.8+9-LTS, mixed mode, sharing)

Quarkus version or git rev

3.26.4

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /home/lberrymage/.m2/wrapper/dists/apache-maven-3.9.9-bin/33b4b2b4/apache-maven-3.9.9
Java version: 21.0.8, vendor: Eclipse Adoptium, runtime: /home/lberrymage/.sdkman/candidates/java/21.0.8-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.10.9-arch1-2", arch: "amd64", family: "unix"

Additional information

The documentation's wording leads me to believe that group.id defaults to the value of quarkus.application.name in all run modes including production. If this isn't intended and the bug this issue describes is expected behavior, I think the documentation should at least be updated to reflect that.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions