cmr-exchange / dev-env-manager

An Alternate Development Environment Manager for the CMR
Apache License 2.0
0 stars 1 forks source link

Allow for subscribers to be deleted #22

Open oubiwann opened 6 years ago

oubiwann commented 6 years ago

The core functionality for this is provided by the core.async/unsub function:

(unsub p topic ch)

However, this requires that we hold onto the channel that gets subscribed to a publisher. The pubsub messaging impl needs to be updated to track subscribers. These should probably be named, too -- which means a handful of functions need to be updated. We should also provide API fns for getting all subscribers, one subscriber, unsubscribing all subscribers, and unsubscribing one.

This will mean we can update the shutdown for the default-subscriber component to unsub its own and then update the messaging component to unsubscribe all. The timer component can unsubscribe its own, too.