Tuesday, January 14, 2020

8. KAFKA : Sample Program6 : With Custom Serializer

8. KAFKA : Sample Program6 : With Custom Serializer

//Custom Serializer -
#####################################-
Supplier.java
SupplierSerializer.java
SimpleProducer.java

SupplierDeserializer.java
SupplierConsumer.java

//create topic
bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic SupplierTopic --partitions 5 --replication-factor 3


-> Eclipse -> Run SupplierConsumer.java
-> Eclipse -> Run SimpleProducer.java

---------------------------------------------------------
Supplier id= 101 Supplier  Name = Xyz Pvt Ltd. Supplier Start Date = Fri Apr 01 00:00:00 EDT 2016
Supplier id= 102 Supplier  Name = Abc Pvt Ltd. Supplier Start Date = Sun Jan 01 00:00:00 EST 2012
---------------------------------------------------------







No comments:

Post a Comment