Federico Mariani created CAMEL-27059:
----------------------------------------
Summary: camel-kafka - a consumer without groupId joins a new
generated consumer group at each start, and logs nothing about it
Key: CAMEL-27059
URL: https://issues.apache.org/jira/browse/CAMEL-27059
Project: Camel
Issue Type: Bug
Components: camel-kafka
Reporter: Federico Mariani
Without {{groupId}} the Kafka consumer uses a generated consumer group id (a
random UUID), a new one each time the application starts. This is the default
since CAMEL-11473, so that a consumer without a group receives every record
(publish-subscribe). But the consumer starts without a word about it:
* After a restart the consumer is in a new group, so it does not resume from
the offsets it committed. With the default {{autoOffsetReset=latest}}, the
records sent while the application was stopped are never consumed.
* Each instance of the application (each replica) is a group of its own, so
every instance processes every record instead of sharing them.
The log does not name the group. The description of the {{groupId}} option says
"This option is required for consumers.", which is not what the code does, and
consumer examples of the component page (the idempotent consumer, the pausable
consumer, the minimal consuming route) have no {{groupId}}.
{code:java}
from("kafka:orders?brokers=localhost:9092")
.to("log:orders"); // a new group at each start: the records sent during a
restart are not consumed
{code}
Expected: the generated group stays the default, but the consumer logs a WARN
when it starts, with the generated group and the advice to set {{groupId}}. The
option description and the component page say what happens without {{groupId}},
and the consumer examples set it.
_Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)