Apache Kafka Consumer group and Simple Consumer -
i new kafka, i've understood sofar regarding consumer there 2 types of implementation.
1) the high level consumer/consumer group
2) simple consumer
the important part high level abstraction used when kafka doesn't care handling offset while simple consumer provides better control on offset management. confuse me if want run consumer in multithreaded environment , want have control on offset.if use consumer group mean must read last offset stored in zookeeper? option have.
for part, high-level consumer api not let control offset directly.
when consumer group first created, can tell whether start oldest or newest message kafka has stored using auto.offset.reset
property.
you can control when high-level consumer commits new offsets zookeeper setting auto.commit.enable
false.
since high-level consumer stores offsets in zookeeper, app access zookeeper directly , manipulate offsets - outside of high-level consumer api.
your question little confusing can use simple consumer in multi-threaded environment. that's high-level consumer does.
Comments
Post a Comment