----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/24856/#review51050 -----------------------------------------------------------
Looks good overall, although you are probably aware of the caveats - this will work correctly if you have a single consumer instance and if you don't have to bounce that instance - essentially cause a fetch of offsets. In order to make it work in the general/common case of multiple consumers in the group and shutdown/restart we will need to implement the offset tuple approach to maintaining the consumer's current state. (https://cwiki.apache.org/confluence/display/KAFKA/Transactional+Messaging+in+Kafka#TransactionalMessaginginKafka-Transactionalconsumer) core/src/main/scala/kafka/consumer/ConsumerTransactionBuffer.scala <https://reviews.apache.org/r/24856/#comment88967> We should probably just grab this from TxRequestTypes in the api package for consistency. core/src/main/scala/kafka/consumer/ConsumerTransactionBuffer.scala <https://reviews.apache.org/r/24856/#comment88968> I guess we can just call it transaction buffer. Also, I'm assuming this is somewhat temporary. i.e., ideally we would want to have a nice trait for this and be able to specify features such as spilling to disk, etc. - Joel Koshy On Aug. 19, 2014, 5:53 p.m., Dong Lin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/24856/ > ----------------------------------------------------------- > > (Updated Aug. 19, 2014, 5:53 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1601 > https://issues.apache.org/jira/browse/KAFKA-1601 > > > Repository: kafka > > > Description > ------- > > KAFKA-1601; ConsoleConsumer/SimpleConsumerPerformance should be > transaction-aware > > > Diffs > ----- > > core/src/main/scala/kafka/consumer/ConsumerTransactionBuffer.scala > PRE-CREATION > core/src/main/scala/kafka/message/MessageAndMetadata.scala > d693abc620aef7030f29f915604c5e172d60da0d > core/src/main/scala/kafka/tools/ConsoleConsumer.scala > 323fc8566d974acc4e5c7d7c2a065794f3b5df4a > core/src/main/scala/kafka/tools/SimpleConsumerPerformance.scala > 7602b8d705970a5dab49ed36d117346a960701ac > > Diff: https://reviews.apache.org/r/24856/diff/ > > > Testing > ------- > > > Thanks, > > Dong Lin > >