0
votes

While I am reading the Mule in Action book to understand message properties' scopes, I encounter that Request-response outbound endpoints create inbound properties. More over, I came to know that message sources like inbound endpoints create inbound properties.

How can I know which inbound property is created by which endpoint, inbound or outbound?

How the inbound properties created by request-response outbound endpoints are helpful?

Thanks in advance.

2

2 Answers

1
votes

How can I know which inbound property is created by which endpoint, inbound or outbound?

You can't, you have to deal with the inbound properties of your inbound endpoint before calling a request-response outbound endpoint. For example, you can copy interesting inbound properties in flow variables to preserve them.

How the inbound properties created by request-response outbound endpoints are helpful?

Supposed you hit a request-response HTTP endpoint amid flow, you'll want to get the status code of the HTTP response. That's when such properties are handy.

1
votes

The response from calling an outbound-endpoint will be placed in the payload(if any) and the inbound property scope.

For example calling:

<http:outbound-endpoint address="http://google.com" />

Will return a HTTP Status code. THis will be stored in the inbound property #[message.inboundProperties['http.status']] as well as many other http properties, such as the Content-type etc.

Different transports add different properties, you will need to check each transports documentation etc to find info on them.

You can log the message properties to investigate yourself what properties are added. This will log the entire message and its properties.

<logger level="INFO" />