My use case is to reset offset to a certain number for a particular consumer group before I start the consumer so that I can control where to start consuming. It is not ideal put the reset offset logic inside the consumer application code as this is an out-of-band process and it is part of our operational procedure. I'd like the keep the consumer as generic as possible. I am looking for a solution where I can reset/fetch offset for a list of topic partitions and a particular consumer group which I can invoke at any time as a standalone procedure.
On Mon, 4 Jan 2016 at 19:27 Marko Bonaći <marko.bon...@sematext.com> wrote: > How are you consuming those topics? > > IF: I assume you have a consumer, so why not commit from within that > consumer, after you process the message (whatever "process" means to you). > > ELSE: couldn't you have a dedicated consumer for offset commit requests > that you don't shut down between requests? > > FINALLY: tell us more about your use case. > > Marko Bonaći > Monitoring | Alerting | Anomaly Detection | Centralized Log Management > Solr & Elasticsearch Support > Sematext <http://sematext.com/> | Contact > <http://sematext.com/about/contact.html> > > On Mon, Jan 4, 2016 at 12:18 PM, tao xiao <xiaotao...@gmail.com> wrote: > > > Hi team, > > > > I have a scenario where I want to write new offset for a list of topics > on > > demand. The list of topics is unknown until runtime and the interval > > between each commit is undetermined. what would be the best way to do so? > > > > One way I can think of is to create a new consumer and call > > commitSync(offsets) every time I want to commit. But it seems taking too > > much time to bootstrap the consumer. is there a lighter way to achieve > > this? > > >