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.
The core functionality for this is provided by the
core.async/unsub
function: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.