Hi Aleksandar,
 If I understand you correctly, you want to configure your stateful component. 
You could try to use the Config class in Storm, something like  
"Config.put(key,value)". Then in the prepare function of bolt you can get the 
parameters you set up,like conf.get(key). Hope it will help you.
 
Best,
Cui Qin

Sent from my iPhone

> On 10 Jun 2014, at 15:11, Aleksandar Stojadinovic 
> <[email protected]> wrote:
> 
> Hello,
> 
> I have a topology with two bolt types (among others) which I am not certain 
> about how will work. One of the bolts has a custom made stateful component  
> The other bolt type, the "configurator" configures that component under 
> certain conditions and on input from a spout, prepares a configuration, and 
> communicates with a database in the process. That works fine, but the point 
> that bothers me is that I have to configure my stateful component on start-up 
> with some values in the database, but I want to keep the logic in that bolt 
> clear, without database access. So my solution is to access the database and 
> read the configuration on the "configurator" startup and emit it. But what if 
> the stateful bolt is not up yet? Will the messages get persisted (no sign of 
> something like that in the Storm documents), or the prepare command is 
> executed after the topology is set up?
> 
> In short, how to handle this situation?
> 
> Best regards

Reply via email to