# \[IGN-7976\]Get Name of Message Handler Programmatically

**URL:** <https://forum.inductiveautomation.com/t/ign-7976-get-name-of-message-handler-programmatically/75750>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 30, 2023, 2:31am UTC](https://forum.inductiveautomation.com/t/ign-7976-get-name-of-message-handler-programmatically/75750 "2023-06-30T02:31:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [July 5, 2023, 9:51pm UTC](https://forum.inductiveautomation.com/t/ign-7976-get-name-of-message-handler-programmatically/75750/2 "2023-07-05T21:51:26Z")

</div>

No, this isn't directly possible. I wouldn't necessarily recommend going this route, but if you _really_ wanted to, you can peek at the stack and find the 'filename' we feed into the Jython interpreter, which includes the handler name, which you could parse:

```auto
def handleMessage(payload):
	import sys
	filename = sys._getframe().f_code.co_filename
	# ex: <MessageHandlerScript:projectName/handlerName >	

```

I'll make a note to consider adding the handler name to this somehow. It'd be nice.

---

_[View the full topic](https://forum.inductiveautomation.com/t/ign-7976-get-name-of-message-handler-programmatically/75750)._
