# \[FEATURE\]Message Handler Message Type Binding

**URL:** <https://forum.inductiveautomation.com/t/feature-message-handler-message-type-binding/87406>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 15, 2024, 3:53pm UTC](https://forum.inductiveautomation.com/t/feature-message-handler-message-type-binding/87406 "2024-03-15T15:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [March 15, 2024, 3:53pm UTC](https://forum.inductiveautomation.com/t/feature-message-handler-message-type-binding/87406/1 "2024-03-15T15:53:09Z")

</div>

Wondering if it would be feasible to add the ability to bind the message handler message type to a property.

> **[Message Handler Message Type Property Binding | Ignition Features and Ideas |...](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/message-handler-message-type-property-binding)**
>
> Allow the message type for Perspective message handlers to be bound to a property. I like to keep all message handler properties in a (static) session props

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 15, 2024, 4:34pm UTC](https://forum.inductiveautomation.com/t/feature-message-handler-message-type-binding/87406/2 "2024-03-15T16:34:49Z")

</div>

As in, you want to be able to dynamically switch which message "type" you're listening for?

That's...pretty unlikely to happen, due to how this all works under the hood. Or did I misunderstand your request?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [March 15, 2024, 4:36pm UTC](https://forum.inductiveautomation.com/t/feature-message-handler-message-type-binding/87406/3 "2024-03-15T16:36:56Z")

</div>

I mean, I wouldn't be dynamically changing the type in runtime. All the session props are static and won't change (unless changing in the designer).

The reason I use the custom session props for all the other message handler properties is because I don't want to fat-finger any of the strings or get the wrong capitalization.

Alternate solution would be a message handler management utility of some sort.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 15, 2024, 4:40pm UTC](https://forum.inductiveautomation.com/t/feature-message-handler-message-type-binding/87406/4 "2024-03-15T16:40:20Z")

</div>

Well, a binding is a binding is a binding. We don't have any concept of "compile time" binding evaluation, so even though your use case wouldn't require runtime evaluation, the machinery would have to support it. Which circles back to "probably not going to happen".

I can see the appeal of eliminating repeated string references though, for sure. It's an interesting idea to kick around. There may be something we can do within the designer to make things a bit "smarter", like an autocomplete for defined message handlers/broadcast types, perhaps.
