storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajeev <rajeev.dal...@gmail.com>
Subject Dynamic streamId in declareOutputFields for Bolts
Date Tue, 30 Jan 2018 08:09:22 GMT
Hi,

I am currently using a bolt to emit data to one of the below 2 streams:
declarer.declareStream( "ABC", new Fields( "message" ) );
declarer.declareStream( "XYZ", new Fields( "message" ) );


But now I need to create this StreamId dynamically. I was trying to use
variables initialised in prepare method. But i see that
the declareOutputFields method is called first and does not have the data
initialised in prepare method.

Is there any other way to use a dynamic name for the stream ?

Regards,
Rajeev.

Mime
View raw message