scipp / beamlime

Live data reduction visualisation for ESS
https://scipp.github.io/beamlime/
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Support dynamic registration of handlers. #164

Closed YooSunYoung closed 6 months ago

YooSunYoung commented 6 months ago

This feature was needed for allowing daemons to separate some tasks from the run routine.

For example, KafkaListener might need to handle arbitrary types of messages according to the run_start_message. With this change, KafkaListener can now register handlers whenever it receives run_start_message and don't have to handle them in the run routine. It can simply wrap received messages as a certain types of MessageProtocol and yield them, instead of wrap them and handle them within the routine.

YooSunYoung commented 6 months ago

Closing it for now 😔 since #163 was not proceeded yet ...