I suggest creating your own wrapper object to hold the data.  When using java 
serialized objects you'll need to take care of backwards compatibility. While 
this issue exists no matter what format you use, it is easy to make a new 
version of a java object and not think about if it is compatible.

-Dave

Dave Tauzell | Senior Software Engineer | Surescripts
O: 651.855.3042 | www.surescripts.com |   dave.tauz...@surescripts.com
Connect with us: Twitter I LinkedIn I Facebook I YouTube


-----Original Message-----
From: Ratha v [mailto:vijayara...@gmail.com]
Sent: Tuesday, April 12, 2016 7:00 PM
To: users@kafka.apache.org
Subject: What is the best way to publish and consume different type of messages?

Hi all;
Im using kafka 0.0.8V.

I want to publish /consume byte[] objects, java bean objects, serializable 
objects and much more..

What is the best way to define a publisher and consumer for this type scenario?
When I consume a message from the consumer iterator, I do not know what type of 
the message it is.
Can anybody point me a guide on how to design such scenarios?

Thanks.

--
-Ratha
http://vvratha.blogspot.com/
This e-mail and any files transmitted with it are confidential, may contain 
sensitive information, and are intended solely for the use of the individual or 
entity to whom they are addressed. If you have received this e-mail in error, 
please notify the sender by reply e-mail immediately and destroy all copies of 
the e-mail and any attachments.

Reply via email to