Provide a setting in consumer configuration to specify where to start consuming messages
See original GitHub issueConsumer provides a seek
api for applications to seek to earliest
or latest
to consume messages. It would be good to add a setting in consumer configuration to simply application logic. It is useful for application development and any other similar required use cases.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Kafka Consumer Configurations for Confluent Platform
This topic provides the configuration parameters that are available for Confluent Platform. The Apache Kafka® consumer configuration parameters are ...
Read more >Chapter 4. Kafka Consumers: Reading Data from Kafka
When we add a new consumer to the group, it starts consuming messages from partitions previously consumed by another consumer. The same thing...
Read more >Working With the Kafka Console Consumer Platform For ...
On running the Kafka console consumer utility, the Kafka environment starts up a terminal window or command line prompt.
Read more >Spring Boot and Kafka – Practical Example
Kafka Consumer configuration · [Omitted] Set up the Consumer properties in a similar way as we did for the Producer. · Create the...
Read more >Start consuming only latest messages from Kafka Topic by ...
config.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest");. and then change you group.id and redeploy your consumer. it will start ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sijie Let me try to explain the intention first. We will add a new configuration item which is used by a consumer when subscribing a topic. In detail, we want our consumer program to determine from which place (earlies-the right beginning of message stream or latest-current consuming position) it should begin to consume rather than call the method
seek
explicitly. Is it the right thing you want? Expecting your reply 😃I would expose it in a slightly different angle, such as : “If the subscription does not exist, where do we want to initialize it (either latest or earliest)”
My rationale is that this setting goes with the code, so it’s not going to be practical to change it in different restarts of the same consumer.
For that I would suggest to add an option in
ConsumerConfiguration
named something like:or an alternative might be just a flag, I don’t know what’s better:
With this, one can set the default behavior in the code and then forget about it.