From 4a2bfed21eaa66b75fcdab73836ce65d4ff0045b Mon Sep 17 00:00:00 2001 From: Rahul Vaish Date: Sat, 19 Oct 2019 07:27:49 +0530 Subject: [PATCH 1/8] Add files via upload --- KafkaProducerConsumer/pom.xml | 30 ++++++++++++++ .../KafkaProducerConsumer/Consumer.java | 39 ++++++++++++++++++ .../KafkaProducerConsumer/Producer.java | 37 +++++++++++++++++ .../KafkaProducerConsumer/AppTest.java | 38 +++++++++++++++++ .../target/classes/META-INF/MANIFEST.MF | 5 +++ .../KafkaProducerConsumer/pom.properties | 7 ++++ .../com.example/KafkaProducerConsumer/pom.xml | 30 ++++++++++++++ .../KafkaProducerConsumer/Consumer.class | Bin 0 -> 2390 bytes .../KafkaProducerConsumer/Producer.class | Bin 0 -> 2164 bytes .../KafkaProducerConsumer/AppTest.class | Bin 0 -> 653 bytes 10 files changed, 186 insertions(+) create mode 100644 KafkaProducerConsumer/pom.xml create mode 100644 KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Consumer.java create mode 100644 KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java create mode 100644 KafkaProducerConsumer/src/test/java/com/example/KafkaProducerConsumer/AppTest.java create mode 100644 KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF create mode 100644 KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties create mode 100644 KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml create mode 100644 KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Consumer.class create mode 100644 KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Producer.class create mode 100644 KafkaProducerConsumer/target/test-classes/com/example/KafkaProducerConsumer/AppTest.class diff --git a/KafkaProducerConsumer/pom.xml b/KafkaProducerConsumer/pom.xml new file mode 100644 index 0000000..7919d9c --- /dev/null +++ b/KafkaProducerConsumer/pom.xml @@ -0,0 +1,30 @@ + + 4.0.0 + + com.example + KafkaProducerConsumer + 0.0.1-SNAPSHOT + jar + + KafkaProducerConsumer + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + org.apache.kafka + kafka-clients + 2.3.0 + + + diff --git a/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Consumer.java b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Consumer.java new file mode 100644 index 0000000..6be5aa2 --- /dev/null +++ b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Consumer.java @@ -0,0 +1,39 @@ +package com.example.KafkaProducerConsumer; +import org.apache.kafka.clients.consumer.ConsumerConfig; +import org.apache.kafka.clients.consumer.ConsumerRecord; +import org.apache.kafka.clients.consumer.ConsumerRecords; +import org.apache.kafka.clients.consumer.KafkaConsumer; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + +public class Consumer { + public static void main(String[] args) { + + String topic = "topic82"; + String brokers = "localhost:8082"; + String stringSerializer = "org.apache.kafka.common.serialization.StringDeserializer"; + + Map config = new HashMap(); + config.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, brokers); + config.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, stringSerializer); + config.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, stringSerializer); + config.put(ConsumerConfig.GROUP_ID_CONFIG, "test"); + + KafkaConsumer consumer = new KafkaConsumer(config); + + HashSet topics = new HashSet(); + topics.add(topic); + consumer.subscribe(topics); + + while (true) { + ConsumerRecords records = consumer.poll(200); + if (!records.isEmpty()) { + for (ConsumerRecord record : records) { + System.out.println(record); + } + } + } + } +} diff --git a/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java new file mode 100644 index 0000000..3fe474b --- /dev/null +++ b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java @@ -0,0 +1,37 @@ +package com.example.KafkaProducerConsumer; +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.ProducerConfig; +import org.apache.kafka.clients.producer.ProducerRecord; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +public class Producer { + + public static void main(String[] args) throws InterruptedException { + String topic = "topic82"; + String brokers = "localhost:8082"; + String StringSerializer = "org.apache.kafka.common.serialization.StringSerializer"; + + Random rnd = new Random(); + + Map config = new HashMap(); + config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, brokers); + config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer); + config.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer); + + + KafkaProducer producer = new KafkaProducer(config); + + while (true) { + LocalDateTime runtime = LocalDateTime.now(); + String msg = runtime + " "+ rnd.nextInt(255); + ProducerRecord record = new ProducerRecord(topic, msg); + producer.send(record); + Thread.sleep(100); + } + + } + +} diff --git a/KafkaProducerConsumer/src/test/java/com/example/KafkaProducerConsumer/AppTest.java b/KafkaProducerConsumer/src/test/java/com/example/KafkaProducerConsumer/AppTest.java new file mode 100644 index 0000000..ea9884e --- /dev/null +++ b/KafkaProducerConsumer/src/test/java/com/example/KafkaProducerConsumer/AppTest.java @@ -0,0 +1,38 @@ +package com.example.KafkaProducerConsumer; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} diff --git a/KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF b/KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4c26307 --- /dev/null +++ b/KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: rahul +Build-Jdk: 1.8.0_221 +Created-By: Maven Integration for Eclipse + diff --git a/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties b/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties new file mode 100644 index 0000000..99aa86d --- /dev/null +++ b/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Wed Oct 16 20:00:05 IST 2019 +version=0.0.1-SNAPSHOT +groupId=com.example +m2e.projectName=KafkaProducerConsumer +m2e.projectLocation=/home/rahul/Documents/JAVA-WORKSPACE/KafkaProducerConsumer +artifactId=KafkaProducerConsumer diff --git a/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml b/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml new file mode 100644 index 0000000..7919d9c --- /dev/null +++ b/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml @@ -0,0 +1,30 @@ + + 4.0.0 + + com.example + KafkaProducerConsumer + 0.0.1-SNAPSHOT + jar + + KafkaProducerConsumer + http://maven.apache.org + + + UTF-8 + + + + + junit + junit + 3.8.1 + test + + + org.apache.kafka + kafka-clients + 2.3.0 + + + diff --git a/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Consumer.class b/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Consumer.class new file mode 100644 index 0000000000000000000000000000000000000000..1f7f7c2a913546dadf2463d9ca506d953577d6cc GIT binary patch literal 2390 zcmb7FT~iZR7=8{U*(9!_;X|XQyRQeB` z@unA@adf7)Ubh!8mYGhkI-UNH{(%00(&uav2*ON(413PL=e%Ff`@HY|_3y900XT>6 zG;|3Jm7SU)pO`h*md1oRw_x7!oJylCy)mcmH)_%|+8YfKf&GuoMbog&deyjHdMwL< zKejOkhGy(NqU z^Oi4grm*vf^7K|St-8R#;KRa3WW~U<>eYN^CXNFFTHv@=d2}R>UV(kKay{?(L2h(d z$@&FG9j}@-U9&tdvkMA>EJLU{^{g)$p>2I{1{U9%RgaeI#|fd^Afls#9mzCd&To}u zwu<67$r3HdrEH}m%sAd9=8LA?kZ;J}7l>Cqr{QL;N*sfPGmw6uVMxFrC`J<$BLu}L z+m@^czEN%yBcw~49Z6(xMpgVQeYN5bL1A*Nga%^^R7Dvikwrp1Ms%FV2L!;ZR0R6B z0U+~0xwxp~LyQU}{6@(ydsc~bN_V;&b8MTmWWne)N~Wv7Kb7hw9Up@pSv69jpKKkZW;lbB+Hb@_xW>T6r*=+?Z3I|9SIjXZ(7nAT9- z)c?gLKae#YUw~cT?I_~*Hz{d3#vOKGz>bk-jgZ~P0}ZnRyr#kdnNp7R7ZqDvHUVj@)9Z|Fj zt!&@lwe207P8OYpSC%&{^;z57u18jp1}DI_2**zscl;Fcsqx+5D!4|6RuKQ0n=T~z zRL8&`{s6ssf$LtrC9n@Ylu%hbqe*r9r_}yJDm9tvn_9)d>K-`Uu{mpauHuOc&>j;!ExF1m^=4GiaE>DcLIoV%Bfren*vkdF4@qh;iCT3TDi zl^1LOsP%d-@d^jiiPyL#@H=kj;=kbYbbOgUDf?33#oFJm*8X6G%{a%A;(j0BdYIvU z=91#C7e~>DLG*Lz58w(8vAGYUh$DEw@1x0Y;R24sCxlON5x_IV#+B@%%?f?z-vc8Rk$$gx04q4~s=8Vgiq8J;wiG*r*ZJr--8thfkL_ bhj_oK`7L+N``-F}fBk;I`vMJWbYby7oU@J{ literal 0 HcmV?d00001 diff --git a/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Producer.class b/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Producer.class new file mode 100644 index 0000000000000000000000000000000000000000..32c3d18853d052c710b9170a86b6136229eff2ec GIT binary patch literal 2164 zcmb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A5kKyi=w`SK~jWb@1qP(j10md&kE7KgauS# ol6{eu&<=KqwHmI%A`g|a_0XG5F&v66`EGc+AE2P1~hLy$^ZZW literal 0 HcmV?d00001 diff --git a/KafkaProducerConsumer/target/test-classes/com/example/KafkaProducerConsumer/AppTest.class b/KafkaProducerConsumer/target/test-classes/com/example/KafkaProducerConsumer/AppTest.class new file mode 100644 index 0000000000000000000000000000000000000000..2b86e7dcf727098c05f9ee0af43372b11bb8db31 GIT binary patch literal 653 zcma)3+e*Vg5IxhTjmCJZt=2n&LaSg9A1i_sd@+d7QqZ@xt{TmyY!dae^hr_h1Nm53(?u*>mR1naRiJ>pOrQtePkgn*AtnocpX%aihNQdqR0S&mWEC+KUNW?!T?J2qOs_J7$+! z^p_n%DNenF!Fr?V{xws}#0+8nFQ}s{EmTm`bIcN|-v@5{B960pO>KdfM<_O$Jqv^d z8;e*XSWJ;B>8g|+7>zT%9jgcy$3tr`L=eBH7+gkKLba0jxtA+vwal!0OifC zXN)}YR{<7BD|@XnvxYIwXNN4<80U=nn7|}!jA9DYxz=Xh!FogGv_j9QJ~DHtr~3g* lnU?NHm_t3U+vQuMCF2G2KP{}oz(!VP4@tQN!g40Q@&!+ni9Y}U literal 0 HcmV?d00001 From b1aa48af600e0d0761a099fd9cbce053f2e08f35 Mon Sep 17 00:00:00 2001 From: rahulvaish Date: Sat, 2 Apr 2022 16:00:30 -0400 Subject: [PATCH 2/8] Kafka Producer --- KafkaProducerConsumer/.idea/.gitignore | 3 + KafkaProducerConsumer/.idea/compiler.xml | 13 ++++ KafkaProducerConsumer/.idea/encodings.xml | 7 ++ .../.idea/jarRepositories.xml | 20 ++++++ KafkaProducerConsumer/.idea/misc.xml | 12 ++++ KafkaProducerConsumer/.idea/vcs.xml | 6 ++ KafkaProducerConsumer/pom.xml | 8 ++- .../KafkaProducerConsumer/Producer.java | 27 +++----- .../KafkaProducerConsumer-0.0.1-SNAPSHOT.jar | Bin 0 -> 4579 bytes .../target/classes/META-INF/MANIFEST.MF | 5 -- .../KafkaProducerConsumer/pom.properties | 7 -- .../com.example/KafkaProducerConsumer/pom.xml | 30 --------- .../KafkaProducerConsumer/Consumer.class | Bin 2390 -> 2533 bytes .../KafkaProducerConsumer/Producer.class | Bin 2164 -> 2386 bytes .../target/maven-archiver/pom.properties | 5 ++ .../compile/default-compile/createdFiles.lst | 2 + .../compile/default-compile/inputFiles.lst | 2 + .../default-testCompile/createdFiles.lst | 1 + .../default-testCompile/inputFiles.lst | 1 + ....example.KafkaProducerConsumer.AppTest.xml | 63 ++++++++++++++++++ ....example.KafkaProducerConsumer.AppTest.txt | 4 ++ .../KafkaProducerConsumer/AppTest.class | Bin 653 -> 645 bytes 22 files changed, 155 insertions(+), 61 deletions(-) create mode 100644 KafkaProducerConsumer/.idea/.gitignore create mode 100644 KafkaProducerConsumer/.idea/compiler.xml create mode 100644 KafkaProducerConsumer/.idea/encodings.xml create mode 100644 KafkaProducerConsumer/.idea/jarRepositories.xml create mode 100644 KafkaProducerConsumer/.idea/misc.xml create mode 100644 KafkaProducerConsumer/.idea/vcs.xml create mode 100644 KafkaProducerConsumer/target/KafkaProducerConsumer-0.0.1-SNAPSHOT.jar delete mode 100644 KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF delete mode 100644 KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties delete mode 100644 KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml create mode 100644 KafkaProducerConsumer/target/maven-archiver/pom.properties create mode 100644 KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst create mode 100644 KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst create mode 100644 KafkaProducerConsumer/target/surefire-reports/TEST-com.example.KafkaProducerConsumer.AppTest.xml create mode 100644 KafkaProducerConsumer/target/surefire-reports/com.example.KafkaProducerConsumer.AppTest.txt diff --git a/KafkaProducerConsumer/.idea/.gitignore b/KafkaProducerConsumer/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/KafkaProducerConsumer/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/KafkaProducerConsumer/.idea/compiler.xml b/KafkaProducerConsumer/.idea/compiler.xml new file mode 100644 index 0000000..938b0e5 --- /dev/null +++ b/KafkaProducerConsumer/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/KafkaProducerConsumer/.idea/encodings.xml b/KafkaProducerConsumer/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/KafkaProducerConsumer/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/KafkaProducerConsumer/.idea/jarRepositories.xml b/KafkaProducerConsumer/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/KafkaProducerConsumer/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/KafkaProducerConsumer/.idea/misc.xml b/KafkaProducerConsumer/.idea/misc.xml new file mode 100644 index 0000000..67e1e61 --- /dev/null +++ b/KafkaProducerConsumer/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/KafkaProducerConsumer/.idea/vcs.xml b/KafkaProducerConsumer/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/KafkaProducerConsumer/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/KafkaProducerConsumer/pom.xml b/KafkaProducerConsumer/pom.xml index 7919d9c..d7bd24c 100644 --- a/KafkaProducerConsumer/pom.xml +++ b/KafkaProducerConsumer/pom.xml @@ -10,9 +10,11 @@ KafkaProducerConsumer http://maven.apache.org - - UTF-8 - + + UTF-8 + 1.8 + 1.8 + diff --git a/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java index 3fe474b..9d4f7bb 100644 --- a/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java +++ b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java @@ -2,36 +2,31 @@ import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.clients.producer.ProducerRecord; +import org.apache.kafka.common.serialization.IntegerSerializer; -import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; -import java.util.Random; public class Producer { public static void main(String[] args) throws InterruptedException { - String topic = "topic82"; - String brokers = "localhost:8082"; + String topic = "foobar"; + String brokers = "localhost:9092"; + String IntegerSerializer = "org.apache.kafka.common.serialization.IntegerSerializer"; String StringSerializer = "org.apache.kafka.common.serialization.StringSerializer"; - Random rnd = new Random(); - Map config = new HashMap(); config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, brokers); - config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer); + config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, IntegerSerializer); config.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer); + KafkaProducer producer = new KafkaProducer<>(config); - KafkaProducer producer = new KafkaProducer(config); - - while (true) { - LocalDateTime runtime = LocalDateTime.now(); - String msg = runtime + " "+ rnd.nextInt(255); - ProducerRecord record = new ProducerRecord(topic, msg); - producer.send(record); - Thread.sleep(100); + System.out.println("PUBLISHING STARTED"); + for(int i=0;i< 10;i++){ + producer.send(new ProducerRecord(topic, i, "MSG#"+i)); } - + producer.close(); + System.out.println("PUBLISHING ENDED"); } } diff --git a/KafkaProducerConsumer/target/KafkaProducerConsumer-0.0.1-SNAPSHOT.jar b/KafkaProducerConsumer/target/KafkaProducerConsumer-0.0.1-SNAPSHOT.jar new file mode 100644 index 0000000000000000000000000000000000000000..81e3d1053fef330e9cc70ee7e28ccf5a41ac78d6 GIT binary patch literal 4579 zcmbVP2UJtp77a~W0s%s2q)QD#kUA7;p@e4WU3!PmQD7XpbOEJ@NQf@LGMAny{DJ^Gc;C`a%iYsPuMv@F2vj{I*N3($e*F*Wpi0pO^wpDg^vqA-1UR zfsY+oySsj0!`Terw+vfy)klGoVwWl7Kh-3)^e6#Sz0UfDlX{i+}>WBdRvOF2R0MuyVNBE zpBe_ThJo??9!BTIC4__RRs^9MX#~9<$@A>UBEeV_Ul~?jdA^mXdxkvGVRm=a^d)9j zYFO3hD^Q?MJ#{r#Ff#+|$f>23tKu7r+CCtiCTLbmSxMNSK(Z7@P(EiQ!+vDD%&90Z z)l7M$tWpQMS|eHAn0u|gD{?^Td{xS#BpS*K3l*92og4@?k57eUUA~=na7~3oS({H! zUgkXFnTm3$5v4m#I4Y@xe~mHfwG4_i%kE|waaHLv7TH#C&nx}vBtcKsEbFbthI!8{ zd+j5}tysv|mB_&a(#o`QWZBf0^*ZExf_Ou!X8I|RH9$rJ$V1nm#CCbX6DUmx23w@C z>JqTi**f@?8Yx%Bm0`eB%x*m}4P-G)XBgo0%%X6Wn!w;agJsz*lGc%NZ>gYr6f@s$6M5JKw7(G1UZSdqc$}NR=BVuf#_vNe)f%_W`-iXRxzfqsyK#n(4TqJlb_qL4KD(X=S`%d^h^5U4F@8p zQrieQ$+^;}0&3Jc<<$#MTo+3-{J@MwOosG2Z19=WhV5mEB}NVBTG4H2cIng_t1z zS*yd0kfRg4C1BXyfs-laY@*cAQZgFP)%$je17B_1O=OTCoRIOOj65 zlx5SiTC^To6TnDXd*wduW^>|dx&wTQKfNFgp=^IR@U;BWhy6|8MlQKY(4{J`Ump&; z^w-JrCAlYX$4hn2cWke(!or00M@Dx{A_}US$hcXlJ;)F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0SHR*3!Gykl(d&`X0f`XbgGr&K%y!%ED+I2G09S)BD-d zngO10z}mKYO_l&cYY!Y! zWA%XQJikJCYP)qy7>1b1-`oZ~RI~zmEnYv{GW$Nt-8azD8%ZKqYdirXq#BBE6$>1j zm+re{+%(N^Kpx|xp4qU^au{EXEOhDhXn9YU2I-%DU734L#}Vecq+zwDB->LCYXETI z_sZw-e0tPv&r=m?QkO&mQIJjUf zj9M)iz8nz|y{>Apv#NkAp@ld3WDgW6=F4PO(H2R!G#Aw_FQp}PNsZUYy)XY=-{M4! ztTqA%7lQZqE)lylY=8mpCXJP=Q?FqI`^-t{bpgmc3`LMXT|hbdA|l2aCDT7eJj47+=&jKEc`6^ zScy-;J!ipx*5$t^I#%XWB0SPFRs50Y{~yqgl=@_Xf?(u-q5r1ar(5}BO*oxJ6Z9Vz caXibZLTDohu%~_erUL=@@c;l0vg2R>0}V$Cv;Y7A literal 0 HcmV?d00001 diff --git a/KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF b/KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF deleted file mode 100644 index 4c26307..0000000 --- a/KafkaProducerConsumer/target/classes/META-INF/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Built-By: rahul -Build-Jdk: 1.8.0_221 -Created-By: Maven Integration for Eclipse - diff --git a/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties b/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties deleted file mode 100644 index 99aa86d..0000000 --- a/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.properties +++ /dev/null @@ -1,7 +0,0 @@ -#Generated by Maven Integration for Eclipse -#Wed Oct 16 20:00:05 IST 2019 -version=0.0.1-SNAPSHOT -groupId=com.example -m2e.projectName=KafkaProducerConsumer -m2e.projectLocation=/home/rahul/Documents/JAVA-WORKSPACE/KafkaProducerConsumer -artifactId=KafkaProducerConsumer diff --git a/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml b/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml deleted file mode 100644 index 7919d9c..0000000 --- a/KafkaProducerConsumer/target/classes/META-INF/maven/com.example/KafkaProducerConsumer/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - 4.0.0 - - com.example - KafkaProducerConsumer - 0.0.1-SNAPSHOT - jar - - KafkaProducerConsumer - http://maven.apache.org - - - UTF-8 - - - - - junit - junit - 3.8.1 - test - - - org.apache.kafka - kafka-clients - 2.3.0 - - - diff --git a/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Consumer.class b/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Consumer.class index 1f7f7c2a913546dadf2463d9ca506d953577d6cc..6a946c25f8c3b70826d91b1e3975483469f8f1e5 100644 GIT binary patch delta 1082 zcmY*YOLG)e6#njXPv4$N&tN(P=!h^3kGx1GV9=y7yoM-`B%l)rf%xbo&7`4|9=mTM zL8<%!7KB^8ku7UoOe)5*+~~rE<;oQcw8~%L%7w<$Ga^M-_c`aDbH4Msr++p7XxjYK zKi_-@pcgmNNI>CG4J4s059D|0&>6T0D&ADzejRCstRGA{{!9=FyRRqK8M2WLu&g}8 zHl;E#x{;wrW|a=R7|dPv$~u}D8YhE5L?U!5-H{tExM9?QW^CfvY+ws4hRhXb!70oO z&o2x+75SJI+3WH-Ywmr6!CY|sdAEDoC8+24-gP(Bv7JFLhrxWM+nd(0gFzK;Bsg|5 z6exRM2Fc7|8hPxFo7qEA+J;`qaj^Y7M;n#)QhUOQW=gI|qZLX_It}bam;5r3)AJ}8 z=)peuL*h+395C<}-oC9I%l5~{IXUQY-34K4SzsRkcCI8ee$$Q#_JfKasW=g`Dx=I%`>P-4BN15aL ztN8`RFUujGTN?3w6O#{_sbRBWWDS||6>P9oOEt~CtJtVujKr3%)uk8m)~^56+ss^DUP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ducerConsumer/Producer.class b/KafkaProducerConsumer/target/classes/com/example/KafkaProducerConsumer/Producer.class index 32c3d18853d052c710b9170a86b6136229eff2ec..b183239407bb6116e2a2f9bdf904f1bcc9349a35 100644 GIT binary patch literal 2386 zcmb7GTT|Oc6#f<)uW?KObBkL-Nz#iUfXIyirfI_^3B_E3xrC-SSze5SEUB_YL#7X% zHZz&&OsD+~ed%-i0BxD+59mw(Pam3|m28j$Gf6zQv^u+c&iTIc?UDcf@6W#gT*qDl z4Tx|=lW0VYq4klvt15*NHCl=EKN1G zt%^G_J~DnajwHiP%P9@3wyJH5;T?5rM;+Fza@jJ6E5gxLLw};WIz7#qt|$p7Uo{GH zc$Q)G)i&o{M>k8ydpTMe+WhQ2S2vV7I2+64 zUL-Pm($as@6vuhubVuwRaV2Saiwd)=8lDJQIW90LF9$U*3s6IrKp!s2QoqfRs^;j^ zMY(7D*PHMz-s8w5(T{;TG356ut|${cOTz0664x!FOgCMsg;2}cI0nh<^4e5xE`M)s z@ory!_4dl@>`Vf~P&h`CxPq$;?LIU0dl|SbJsBoB4|5lknNs7p{#rF$5t`)`6Bxx! zjWVDKBt!RcIfIm@Jl!Y?CxI*?aeTlKUC7_P zBp+`lF@l|jKi&^R74nt3UMkg2EOJWWmF~nUfm}Kb4gh2#W za(WFpS@#8o@l(p6l_?L$6^RoRUiHN&ciIMzvvAzjTb&dknmJYX20#-fPFYS}h~Qm1q}!xgU_ zI@FZ%v{e)gEjis3i(a`PoK>}8kR_FqJ#1a2=0wj`W7OT&D-46VR}Yb;7-dx_4R>W8 zhA6ETp`Tzdoqlt)PIXG;z5SGB1lzT2U6Xmes5*+k3y!rzeTdXtRp@aOB$|R)VN;Aa zrgkQQ`|gg;JISWj`WUXfLLKV}rc}D>dE2vV+})^;Gnicmb#vZTwH<16et9`G4x%vhx(n7aBxWCL!j>SP*G+m-=+5ZgIB)>=t3UlQUF9^;gokuZ1`F^B zKJ{&%;d63Ao7p$uh?DK76wjra7E)&xQ_U06L$qujpl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ztUc?;=4(9v`OP1MCK6(rC%ho+5kej(IYF4y=))lTaTAwmOAcU;R>u;3CyKa+8isLz z>v)L~ydo>f!FHoMe2s6yxUcXnbgDj%A5kKyi=w`SK~jWb@1qP(j10md&kE7KgauS# ol6{eu&<=KqwHmI%A`g|a_0XG5F&v66`EGc+AE2P1~hLy$^ZZW diff --git a/KafkaProducerConsumer/target/maven-archiver/pom.properties b/KafkaProducerConsumer/target/maven-archiver/pom.properties new file mode 100644 index 0000000..ac10a0d --- /dev/null +++ b/KafkaProducerConsumer/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Sat Apr 02 11:38:38 EDT 2022 +groupId=com.example +artifactId=KafkaProducerConsumer +version=0.0.1-SNAPSHOT diff --git a/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..7d3cc0c --- /dev/null +++ b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,2 @@ +com/example/KafkaProducerConsumer/Consumer.class +com/example/KafkaProducerConsumer/Producer.class diff --git a/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..32d3ac5 --- /dev/null +++ b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,2 @@ +/Users/rahulvaish/myRepos/Apache-Kafka/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Consumer.java +/Users/rahulvaish/myRepos/Apache-Kafka/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java diff --git a/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..c0f986d --- /dev/null +++ b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -0,0 +1 @@ +com/example/KafkaProducerConsumer/AppTest.class diff --git a/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..8fee688 --- /dev/null +++ b/KafkaProducerConsumer/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +/Users/rahulvaish/myRepos/Apache-Kafka/KafkaProducerConsumer/src/test/java/com/example/KafkaProducerConsumer/AppTest.java diff --git a/KafkaProducerConsumer/target/surefire-reports/TEST-com.example.KafkaProducerConsumer.AppTest.xml b/KafkaProducerConsumer/target/surefire-reports/TEST-com.example.KafkaProducerConsumer.AppTest.xml new file mode 100644 index 0000000..972d8c1 --- /dev/null +++ b/KafkaProducerConsumer/target/surefire-reports/TEST-com.example.KafkaProducerConsumer.AppTest.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KafkaProducerConsumer/target/surefire-reports/com.example.KafkaProducerConsumer.AppTest.txt b/KafkaProducerConsumer/target/surefire-reports/com.example.KafkaProducerConsumer.AppTest.txt new file mode 100644 index 0000000..fa20cb0 --- /dev/null +++ b/KafkaProducerConsumer/target/surefire-reports/com.example.KafkaProducerConsumer.AppTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: com.example.KafkaProducerConsumer.AppTest +------------------------------------------------------------------------------- +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec diff --git a/KafkaProducerConsumer/target/test-classes/com/example/KafkaProducerConsumer/AppTest.class b/KafkaProducerConsumer/target/test-classes/com/example/KafkaProducerConsumer/AppTest.class index 2b86e7dcf727098c05f9ee0af43372b11bb8db31..95376b5867c96f18893297856e019248a1e67416 100644 GIT binary patch delta 331 zcmZ9Gy-EX75QV?lU-!C+8a3-rG(-$UW2a>h#3u-dpq=2>hU{9WN?~EKti7+GRYbuD z@S()Hn^aD5X3pF*=iFz1>L)+HpWnb4ZG(dw;>Gv`#bBWGQrVZ5c2m?&j3FepkF|0r zN!Jju60^#hVD7Rk9p_i$$5ilow@267E+6jG;_0<6gn63f7o(Bj_R1IOOd^f4)B#$GyA|5-Q)PDRdmq&QXCLCxt+L~}Xpt@K>50SsAD4+Br~m)} delta 376 zcmZ9G&q@MO6vlr?=TA;ksg0&(MUdbaB+)Vm!fmSx!FB@;QAnANZCkZ$A-3-oYGoAk z0KG_W5uF)l6&JpH&pp5Medp19GV|ZRA78*8n>HE2pH#)SYz(0?xf5@^TQ3Mk`}QJq z$dYq0vBp0yiYyD&7&$o|T}9e0Qi{7}!D}2}2lqj%7u;O7+Pz>nJn%b$9fiZ_sNWZ| z4Zq_cth%gG6C6dtL3B14g&Nj4pFGRfgJQZEsuG8)+FBiw(F0a Date: Sat, 2 Apr 2022 16:11:44 -0400 Subject: [PATCH 3/8] Kafka Producer --- .../main/java/com/example/KafkaProducerConsumer/Producer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java index 9d4f7bb..87a26f5 100644 --- a/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java +++ b/KafkaProducerConsumer/src/main/java/com/example/KafkaProducerConsumer/Producer.java @@ -23,7 +23,7 @@ public static void main(String[] args) throws InterruptedException { System.out.println("PUBLISHING STARTED"); for(int i=0;i< 10;i++){ - producer.send(new ProducerRecord(topic, i, "MSG#"+i)); + producer.send(new ProducerRecord<>(topic, i, "MSG#"+i)); } producer.close(); System.out.println("PUBLISHING ENDED"); From d5ee176321ea1695f1d9e1a98ae2c4bf15ffe959 Mon Sep 17 00:00:00 2001 From: Rahul Vaish Date: Sat, 2 Apr 2022 16:25:46 -0400 Subject: [PATCH 4/8] Create Readme.MD --- Readme.MD | 1 + 1 file changed, 1 insertion(+) create mode 100644 Readme.MD diff --git a/Readme.MD b/Readme.MD new file mode 100644 index 0000000..319c908 --- /dev/null +++ b/Readme.MD @@ -0,0 +1 @@ +![image](https://user-images.githubusercontent.com/689226/161400001-ba853ee5-8e2b-409f-ab2e-2b05392cddfa.png) From 967a6b78cd20a930356d8f98a60989b6ff3b89c3 Mon Sep 17 00:00:00 2001 From: Rahul Vaish Date: Sat, 2 Apr 2022 17:03:54 -0400 Subject: [PATCH 5/8] Update Readme.MD --- Readme.MD | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Readme.MD b/Readme.MD index 319c908..be90ca6 100644 --- a/Readme.MD +++ b/Readme.MD @@ -1 +1,13 @@ -![image](https://user-images.githubusercontent.com/689226/161400001-ba853ee5-8e2b-409f-ab2e-2b05392cddfa.png) +### Internals of Kafka Producer: +image + +- Only Topic and Message Value are mandatory parameters of Producer Record object +- Key:If you provide key, the hash of the key is calculated and according to the result the the partition is chosen for data to reside.When you don't provide the key the data goes in Round Robin fashion amongst the various partitions +- Timestamp: Deafault timestamp is 0 whihc is create time. +- Partition: You can specify manually the partion you want to send data to (not optimal approach) +- Serializer Serializes the Key & Message Value +- Partitioner: Kafka Default partitioner works by checking the 'Partition' value of Producer Record. +- Buffers offer async data transfer + network optimisation + +image + From 412b168691c525ab513805f2b72bfbb55ba02ccc Mon Sep 17 00:00:00 2001 From: Rahul Vaish Date: Sat, 2 Apr 2022 17:07:15 -0400 Subject: [PATCH 6/8] Update Readme.MD --- Readme.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.MD b/Readme.MD index be90ca6..acec1b5 100644 --- a/Readme.MD +++ b/Readme.MD @@ -3,7 +3,7 @@ - Only Topic and Message Value are mandatory parameters of Producer Record object - Key:If you provide key, the hash of the key is calculated and according to the result the the partition is chosen for data to reside.When you don't provide the key the data goes in Round Robin fashion amongst the various partitions -- Timestamp: Deafault timestamp is 0 whihc is create time. +- Timestamp: For create time (time when msg is produced) value is 0. For Log append time (time when message is received) the value is 1. - Partition: You can specify manually the partion you want to send data to (not optimal approach) - Serializer Serializes the Key & Message Value - Partitioner: Kafka Default partitioner works by checking the 'Partition' value of Producer Record. From 3f9c75d14c598b9d736eae764deb5f600089043a Mon Sep 17 00:00:00 2001 From: Rahul Vaish Date: Sun, 3 Apr 2022 13:17:07 -0400 Subject: [PATCH 7/8] Update Readme.MD --- Readme.MD | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Readme.MD b/Readme.MD index acec1b5..38474fb 100644 --- a/Readme.MD +++ b/Readme.MD @@ -1,13 +1,2 @@ -### Internals of Kafka Producer: -image - -- Only Topic and Message Value are mandatory parameters of Producer Record object -- Key:If you provide key, the hash of the key is calculated and according to the result the the partition is chosen for data to reside.When you don't provide the key the data goes in Round Robin fashion amongst the various partitions -- Timestamp: For create time (time when msg is produced) value is 0. For Log append time (time when message is received) the value is 1. -- Partition: You can specify manually the partion you want to send data to (not optimal approach) -- Serializer Serializes the Key & Message Value -- Partitioner: Kafka Default partitioner works by checking the 'Partition' value of Producer Record. -- Buffers offer async data transfer + network optimisation - -image +image From 8529b5f5c3e573426ed7c2c514e06d525c64875b Mon Sep 17 00:00:00 2001 From: Rahul Vaish Date: Sun, 3 Apr 2022 13:17:18 -0400 Subject: [PATCH 8/8] Delete Readme.MD --- Readme.MD | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Readme.MD diff --git a/Readme.MD b/Readme.MD deleted file mode 100644 index 38474fb..0000000 --- a/Readme.MD +++ /dev/null @@ -1,2 +0,0 @@ - -image