Search code examples
mulemule-studiomule-elmule-component

How to Identify and print the inbound properties in mule


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]


Solution

  • 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.