pravahio / go-mesh

Realtime data exchange platform for Smart Cities
https://pravah.io
MIT License
25 stars 5 forks source link

go routine per topic should be terminated if that topic is unsubscribed #28

Open upperwal opened 4 years ago

upperwal commented 4 years ago

Currently, subscriber service has a global context. We would need a local context per topic which could be used to terminate go routines working on each topic subscriber.

https://github.com/pravahio/go-mesh/blob/cd976277a5db44a8c8f39fd4ffc234ac6bceb1fc/service/subscriber/api.go#L48-L65