SOHU-Co / kafka-node

Node.js client for Apache Kafka 0.8 and later.
MIT License
2.66k stars 628 forks source link

fromOffset overridden by rebalance in HighLevelConsumer #308

Open OndroNR opened 8 years ago

OndroNR commented 8 years ago

I am unable to specify partition offset on init in HighLevelConsumer. Consumer rebalances on initialization and loads offset from ZooKeeper. Should HighLevelConsumer be able to process from specified offset?

estliberitas commented 8 years ago

@OndroNR according to new Consumer API user has to specify enable.auto.commit=false.

So if you set autoCommit: false along with your fromOffset value in configuration and it does not work, it's a bug. The question is - do you actually disable auto-committing of offset? :wink:

OndroNR commented 8 years ago

Yes, I do :wink: I think this library has problem tracking Java client implementation.

estliberitas commented 8 years ago

@OndroNR maybe, unfortunately I had no look at consumer code and do not understand what's going on there xD

estliberitas commented 8 years ago

@OndroNR Just checked, there is no use of fromOffset in HighLevelConsumer.

OndroNR commented 8 years ago

@estliberitas checked it too, it does not appear, that fromOffset is used via options hash in referenced classes. fromOffset should be removed from DEFAULTS and readme.

estliberitas commented 8 years ago

@OndroNR same thing about addTopics() LOL