# Only clone messages sent to 2nd or higher wire on same output

**URL:** <https://discourse.nodered.org/t/only-clone-messages-sent-to-2nd-or-higher-wire-on-same-output/50165>\
**Category:** Feature Requests\
**Created:** [25 August 2021 14:03 UTC](https://discourse.nodered.org/t/only-clone-messages-sent-to-2nd-or-higher-wire-on-same-output/50165 "2021-08-25T14:03:33Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [26 August 2021 14:59 UTC](https://discourse.nodered.org/t/only-clone-messages-sent-to-2nd-or-higher-wire-on-same-output/50165/13 "2021-08-26T14:59:47Z")

</div>

> [@massi-ang](#):
>
> if the prototype is the same, the object is the same and therefore the cloner function, whoever has written it, should work

Indeed that is correct. The problem that I had described probably will almost never occur I assume.

> [@massi-ang](#):
>
> It could also be better move the `registerCloner()` method on the `Node` prototype

I am not sure if that is correct... I "think" that cloning of messages might be a new kind of _ **hook** _, but I may be completely wrong!!!! The message hooks have been introduced via [this](https://github.com/node-red/node-red/pull/2665) pull request. But as you can see [here](https://discourse.nodered.org/t/live-stream-about-pluggable-message-routing-some-questions/30508/14) it is not decided at the time being how/if custom cloning would fit into this picture...

BTW you can read [here](https://github.com/node-red/designs/pull/7#discussion_r460817660) that cloning happens between the `preRoute` and `onSend` hook.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b6ac3adc8ed1bd23931c44bd04b4ad5ead07356.png)

I try to avoid mentioning @knolleary as much as possible, but I'm afraid he is about the only one that can judge whether you are heading in the right direction...

---

_[View the full topic](https://discourse.nodered.org/t/only-clone-messages-sent-to-2nd-or-higher-wire-on-same-output/50165)._
