1

Hi i am working with mule and i want to know how to access incoming message inbound properties. I am trying to get Mule_Originating_Endpoint property but i am unable to print or set it in some variable.

[message.inboundProperties.MULE_ORIGINATING_ENDPOINT]

Community
  • 1
  • 1
Utsav
  • 1,593
  • 4
  • 22
  • 46

1 Answers1

2

Use a logger without any message to log all properties and payload type:

<logger level="ERROR" />

Or log the inbound properties map:

<logger level="ERROR" message="#[message.inboundProperties]" />

Should print out something similar to {MULE_ORIGINATING_ENDPOINT=endpoint.polling.1912630717}

You should be able to access that property via #[message.inboundProperties.MULE_ORIGINATING_ENDPOINT]

Or

[message.inboundProperties['MULE_ORIGINATING_ENDPOINT']]

and so on.

Community
  • 1
  • 1
Ryan Carter
  • 11,441
  • 2
  • 20
  • 27
  • Yes i want to put a check like #[message.inboundProperties.'MULE_ORIGINATING_ENDPOINT'== 'endpoint.http.localhost.8081.mule'] , instead of that i want to match only for http how to do that see i put * in place of that #[message.inboundProperties.'MULE_ORIGINATING_ENDPOINT'== 'endpoint.http.*'] – Utsav Oct 14 '14 at 13:40
  • For that I would look at the MEL regex function: http://www.mulesoft.org/documentation/display/current/Mule+Expression+Language+MEL – Ryan Carter Oct 14 '14 at 14:22
  • please let me know if possible because my intention was just to check one condition to identify the call originator in composite source whether it is from HTTP or JMS based on that condition check i will route to some other sub flow ....... – Utsav Oct 14 '14 at 14:51