> On Feb. 27, 2015, 7:29 p.m., Gwen Shapira wrote: > > Thanks for the patch, Ashish. Its shaping up to be a very useful example. > > Two comments: > > > > 1. I think the ser/de should be part of the example and not in "common", > > I'm not sure integer ser/de is useful enough to be distributed with Kafka > > (although Jun can correct me if I got this wrong). > > > > 2. I saw a lot of discussion on the mailing list around using the new > > producer async vs. sync. This example shows the async path. Do we want to > > add another "sync" example where we do something like: > > val future = producer.send(new ProducerRecord<Integer, String>(topic, > > messageNo, > > messageStr), new DemoCallBack(startTime, messageNo, > > messageStr)); > > // this waits for send to complete > > future.get > > Jun Rao wrote: > Gwen, > > Integer may be a common type for keys. So, it probably makes sense to > include Integer ser/de in common. > > I agree that it would be useful to add a "sync" example.
Added "sync" example. - Ashish ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31369/#review74553 ----------------------------------------------------------- On March 4, 2015, 1:51 a.m., Ashish Singh wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31369/ > ----------------------------------------------------------- > > (Updated March 4, 2015, 1:51 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1982 > https://issues.apache.org/jira/browse/KAFKA-1982 > > > Repository: kafka > > > Description > ------- > > KAFKA-1982: change kafka.examples.Producer to use the new java producer > > > Diffs > ----- > > > clients/src/main/java/org/apache/kafka/common/serialization/IntegerDeserializer.java > PRE-CREATION > > clients/src/main/java/org/apache/kafka/common/serialization/IntegerSerializer.java > PRE-CREATION > > clients/src/test/java/org/apache/kafka/common/serialization/SerializationTest.java > f5cd61c1aa9433524da0b83826a766389de68a0b > examples/README 53db6969b2e2d49e23ab13283b9146848e37434e > examples/src/main/java/kafka/examples/Consumer.java > 13135b954f3078eeb7394822b0db25470b746f03 > examples/src/main/java/kafka/examples/KafkaConsumerProducerDemo.java > 1239394190fe557e025fbd8f3803334402b0aeea > examples/src/main/java/kafka/examples/Producer.java > 96e98933148d07564c1b30ba8e805e2433c2adc8 > examples/src/main/java/kafka/examples/SimpleConsumerDemo.java > 0d66fe5f8819194c8624aed4a21105733c20cc8e > > Diff: https://reviews.apache.org/r/31369/diff/ > > > Testing > ------- > > > Thanks, > > Ashish Singh > >