unlisten?
See original GitHub issueAny plans for bus.unlisten
?
Issue Analytics
- State:
- Created 10 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
unlisten - Wiktionary
(computing) To cease to listen for incoming signals. Coordinate termsEdit · untalk. AnagramsEdit.
Read more >Unlistened Definition & Meaning - Merriam-Webster
The meaning of UNLISTENED is not listened to : not heard.
Read more >Documentation: 15: UNLISTEN - PostgreSQL
UNLISTEN is used to remove an existing registration for NOTIFY events. UNLISTEN cancels any existing registration of the current PostgreSQL session as a ......
Read more >Unlistened definition and meaning | Collins English Dictionary
Unlistened definition: not heard or listened to | Meaning, pronunciation, translations and examples.
Read more >Map.unlisten - Earth Engine - Google Developers
Map.unlisten ; idOrType, String, optional, Either an ID returned by listen() when a callback was registered, an event type, or nothing. If an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Haha. No worries. 😉 I still need to update the README, but here’s an outline of the changes as I sent to a client:
Send/Listen:
You can unlisten or destroyListener directly from an instance of a bus:
If you create a listener:
You can tell it to stop listening via:
One thing to note is that, due to how RabbitMQ works, you may get a few more messages after you make the call to unlisten(). You know when it’s officially stopped when RabbitMQ responds. Unlisten gives back an EventEmitter which will tell you exactly when that is via a ‘success’ event:
picked up by any local listeners by the same routing key });
If you want to physically destroy the queue this listener is attached on, you can use destroyListener():
It also returns an EventEmitter to show success:
Publish/Subscribe:
Since you may have multiple subscriptions on a routing key in a process (though probably not a great idea to do so), it doesn’t make sense to unsubscribe directly from the bus instance. So, when subscribing, a subscription object is returned to you:
(event) { // do something for your event here });
And to unsubscribe, you exercise the unsubscribe() method on that subscription:
On Mon, May 12, 2014 at 11:50 AM, Chris Abrams notifications@github.comwrote:
Very nice! I like that you separated
unlisten
fromdestroyListener
. This will be very helpful - I have a side project that I can now finish integration testing because of this 😃