You emit like this: collector.emit(new Values(yourBeanInstanceHere));
You just need to wrap it in a Values object. Regards, Javier. On Sep 16, 2015 9:37 AM, "Ankur Garg" <ankurga...@gmail.com> wrote: > Hi , > > I am new to apache Storm . To understand it I was looking at storm > examples provided in the storm tutorial ( > https://github.com/apache/storm/tree/master/examples/storm-starter) . > > > In all the examples , we are emitting prmitive types (String,int etc) as > Tuples . > > In my use case I am having a Java Object which i want to emit as tuple to > bolts . > > I am not sure how to do it . It seems I have to implement a custom Tuple > producer to convert java Object to Values . > > Can anyone provide me some example how to do that : > > For ex my Java Object is : > > class Bean > { > int A ; > String B; > Bean2 b; > //setters and getters > > } > > and Class Bean2 > { > //Some Attributes > } > > Now , in my nextTuple() method for Spout , I have an instance of Bean > object . > > How do I translate into Tuple and emit it and consume it through my bolt. > > Any ideas please. > > Thanks > ankur >