Open polachok opened 6 years ago
I've extracted the Inner
from SubscribedTopics
and you can commit, but it still doesn't work because the consume group haven't finished yet, you can check the document for more detail :(
Besides, old kafka (0.8) use zookeeper to maintain the consumer group, we need a special setting to support it later.
I'm still working on the offset commit/fetch scenes, it seems we could support with/without consumer group in same API.
Ok, fine. Btw it's still not possible to commit inside for_each().
.and_then(|topics| {
topics.clone().for_each(|record| {
let v: Vec<u8> = record.value.unwrap();
println!("Consumed: {:?}", String::from_utf8_lossy(&v[0..128]));
topics.commit().map(|_| ())
^^^^^^ borrowed value does not live long enough
})
})