# \[New Node\] node-red-contrib-events: Alternative to link nodes

**URL:** <https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028>\
**Category:** Share Your Nodes\
**Tags:** node-red-contrib-events\
**Created:** [14 September 2021 17:29 UTC](https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028 "2021-09-14T17:29:18Z")\
**Posts on this page:** 4\
**Page:** 3

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 September 2021 21:45 UTC](https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028/41 "2021-09-27T21:45:10Z")

</div>

If you can think of something, I'd be glad to consider it.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 September 2021 21:45 UTC](https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028/42 "2021-09-27T21:45:55Z")

</div>

Yep, its a doozy - I'll sleep on it 🙂

---

<div class="post-metadata">

**Author:** ![mw75](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mw75/32/52490_2.png) [@mw75](https://discourse.nodered.org/u/mw75)\
**Post date:** [31 January 2022 09:48 UTC](https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028/43 "2022-01-31T09:48:25Z")

</div>

This works also great as an data transport when you embed node-red in your own application like described in [Embedding into an existing app : Node-RED](https://nodered.org/docs/user-guide/runtime/embedding) . Just add:

```auto
var events=require('@totallyinformation/ti-common-event-handler');
events.on('node-red-contrib-events/**', console.log);
setInterval(function(){events.emit('node-red-contrib-events/x/y/z',{payload:'works '+Date.now()})},10000)

```

and you get a fexible bidirectional information flow to and from your node-red environment.

I like that approach!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [31 January 2022 09:55 UTC](https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028/44 "2022-01-31T09:55:04Z")

</div>

Yes, that was what initially prompted me to create the base module. It is used not only in this node but also in the uibuilder nodes and the new wiser home heating nodes. It uses the events2 module under the skin which gives you the wildcards - though I extend those to include MQTT style wildcards as well - and is meant to be faster than the normal events module. I also changed the namespace separator to use the MQTT style "/"

[Previous page](https://discourse.nodered.org/t/new-node-node-red-contrib-events-alternative-to-link-nodes/51028.md?page=2)
