Skip to content
Jim Cowart edited this page Jul 8, 2015 · 3 revisions

Top-level method that takes a SubscriptionDefinition as an argument and unsubscribes it so that it no longer receives any messages, etc. This is an alternative to calling unsubscribe on a SubscriptionDefinition instance.

Example:

var sub = postal.subscribe({
	channel: "ui",
	topic: "some.#.topic",
	callback: function(d, e) {
		// do something with data
	}	
});

postal.unsubscribe(sub);
Clone this wiki locally