# Live stream about pluggable message routing: some questions

**URL:** https://discourse.nodered.org/t/live-stream-about-pluggable-message-routing-some-questions/30508
**Category:** Core Development
**Created:** [21 July 2020 21:23 UTC](https://discourse.nodered.org/t/live-stream-about-pluggable-message-routing-some-questions/30508 "2020-07-21T21:23:10Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [25 July 2020 21:53 UTC](https://discourse.nodered.org/t/live-stream-about-pluggable-message-routing-some-questions/30508/14 "2020-07-25T21:53:19Z")

</div>

> [@BartButenaers](#):
>
> Are the handlers in all hooks allowed to update the message or metadata, or are there any restrictions?

I don't _think_ there were be restrictions - but there will be rules of the road that should be followed otherwise things would break.

> [@BartButenaers](#):
>
> A single hook can have multiple handlers. Do you think there might be problems if the sequence of those handlers is changed by the user (in his settings.js file)? Just wondering, but I don't have any particular examples in mind ...

I don't see these hooks as being things end users touch in general. It will be the tools that are developed on top of Node-RED that make use of these hooks that will be what end users touch.

So yes, there will be scope for things going wrong, but to some degree it will be up to those tools to manage... we just have to make sure the hooks are well-defined and understood.

> [@BartButenaers](#):
>
> A handler can change the `cloneMessage` flag. I assume one of the handlers can set the flag to true, while another handler can set it back to false. So handlers can override the flag modifications from other handlers. Don't you think that this might somehow result in conflicts?

> [@BartButenaers](#):
>
> A handler can change the `cloneMessage` flag. I assume one of the handlers can set the flag to true, while another handler can set it back to false. So handlers can override the flag modifications from other handlers. Don't you think that this might somehow result in conflicts?

Yes... but again, if something is touching the clone flag, it needs to know what it is doing and it needs to be aware that it doesn't exist in isolation. But I don't see there being lots of things wanting to touch the clone flag - especially _wanting_ to set it to true. It's far more likely that something wants to set it to false to prevent any further cloning from happening.

> [@BartButenaers](#):
>
> Do I understand it correctly that I could add - in the future - a preRoute handler to my OpenCv.js nodes, that allows the matrices to be cloned correctly?

That's an interesting idea. Technically, this proposal would allow that. We need to evaluate if that is a sensible thing to allow, or even if its technically possible, whether its something we'd endorse doing.

---

_[View the full topic](https://discourse.nodered.org/t/live-stream-about-pluggable-message-routing-some-questions/30508)._
