Apache Storm: get topology name inside bolt

How can I get the name of the current topology inside the implementation BaseRichBolt

? I see that I have access to and TopologyContext

from the stormConfig map prepare()

, but it is not obvious how to get the name of the current topology from any of them.

+3


source to share


1 answer


You can get it from the map config

.
Useconfig.get(Config.TOPOLOGY_NAME)

http://nathanmarz.github.io/storm/doc/backtype/storm/Config.html#TOPOLOGY_NAME



@ComputerDruid thanks for the fix

+3


source







All Articles