# How does Discourse implement live update notifications?

**URL:** <https://meta.discourse.org/t/how-does-discourse-implement-live-update-notifications/46610>\
**Category:** Development\
**Created:** [29 Giugno 2016, 11:11am UTC](https://meta.discourse.org/t/how-does-discourse-implement-live-update-notifications/46610 "2016-06-29T11:11:33Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)\
**Post date:** [1 Luglio 2016, 4:37pm UTC](https://meta.discourse.org/t/how-does-discourse-implement-live-update-notifications/46610/7 "2016-07-01T16:37:20Z")

</div>

Yep, it’s certainly possible. Babble’s implementation:

```plaintext
const messageBus = Discourse. __container__.lookup('message-bus:main')
messageBus.subscribe('/babble/topics/1/posts', (data) => { performSomeAction() })

```

Later, when we switch chat channels and don’t want to listen for topic 1’s events anymore:

```plaintext
messageBus.unsubscribe('/babble/topics/1/posts')
messageBus.subscribe('/babble/topics/2/posts', (data) => { performSomeOtherAction() })

```

---

_[View the full topic](https://meta.discourse.org/t/how-does-discourse-implement-live-update-notifications/46610)._
