aru007
aru007

Reputation: 380

Running multiple topologies in storm

How to have multiple topologies in storm. Also is it possible for topologies to interact with each other? I want one topology to do something and insert data in DB. Then other thread from the other topology probably should pick the data from DB and perform required task.

If their is any tutorial, please suggest.

Upvotes: 0

Views: 717

Answers (2)

Jungtaek Lim
Jungtaek Lim

Reputation: 1708

There's no native supported way to interact between topologies, but you're sharing the DB so if you're writing the data to DB like message log, it could be used to message queue. If you're writing the data to DB unlike the message log, you may want to have another table to log, and let other topology follows that. If you write to DB just for passing data to other topology, adopting message queue (like Apache Kafka) is preferred.

Upvotes: 1

LiozM
LiozM

Reputation: 146

Yes you can, you can also run multiple topologies for the same storm node (for the same storm supervisor). by opening more than 1 port and submitting both topologies.

supervisor.slots.ports:
    - 6700
    - 6701

you can also should set settings like worker.childopts dynamically from within the code.

Upvotes: 1

Related Questions