Unsubscribe

48 views
Skip to first unread message

Rory Casey

unread,
May 5, 2011, 2:10:33 PM5/5/11
to Amplify
Hi,

Just been looking at the pub/sub code and was wondering why you don't
have a catch-all unsubscribe e.g., amplify.unsubscribe('sometopic');
that would unsubscribe all subscriptions.

Is this deliberate? If so what are the reasons why?

- Rory

Scott González

unread,
May 5, 2011, 2:42:50 PM5/5/11
to ampl...@googlegroups.com
Hey Rory,

Could you instead give some reasons why you do want this?

Rory Casey

unread,
May 5, 2011, 3:48:50 PM5/5/11
to Amplify
Sure. You have a reusable widget and you might want to subscribe to
certain topics published by the widget. If there is an error or you
remove the widget it would be handy if it could destroy all its
subscriptions itself instead of having to unsubscribe everywhere that
you use it.

Scott González

unread,
May 5, 2011, 3:56:45 PM5/5/11
to ampl...@googlegroups.com
Widgets shouldn't care if someone's listening to their messages and they certainly shouldn't be removing someone else's subscriptions.

Max Max

unread,
Dec 1, 2011, 9:12:16 AM12/1/11
to ampl...@googlegroups.com
Hi! I suupporting the bunch unsubscribe feature, very handy in module systems when you have a lot of publishers/subscribers.


Reply all
Reply to author
Forward
0 new messages