Need clarification on “Transport Barrier” in understanding properties

房东的猫 提交于 2021-02-08 06:56:21

问题


i have read all "OUTBOUND" properties in Mule floe will be converted to "INBOUND" properties on crossing the "Transport barrier". i could not understand what is this "Transport barrier mean" . Is it calling an external world from an Mule outbound connector ? or calling an flow within the mule project itself ?


回答1:


A "transport barrier" is when your Mule message goes through an endpoint that makes use of a transport (say for example, HTTP endpoints, JMS, TCP, VM, etc).

There are two ways of calling flows in Mule:

  1. Via an endpoint.
  2. Via the Flow-Ref component.

The first case makes use of transports, therefore, your message goes through the whole serialization and deserialization processes. At the end of the day, you will still end up with the same payload BUT it will be a different Mule message.

In the second case, flows are called directly - the Mule message is sent as is to the flow being called.

One important thing to highlight here is that flow variables are NOT propagated to flows when they are called via a transport (therefore crossing the transport barrier). When calling flows with the flow-ref component, flow variables can STILL be accessed even though the Mule message is not in the same flow in which the flow variables were defined.

More information on this topic can be found here:

http://blogs.mulesoft.org/mule-school-the-mulemessage-property-scopes-and-variables/




回答2:


The message outbound properties are converted into Inbound properties when a message passes from outbound-endpoint of one flow to inbound-endpoint of other flow.

for more information you can refer mulesoft documentation here Mule Message Structure

hope this helps!

Good luck!




回答3:


as Vihar mentioned in his answer, I just want to add the following :-

When a message is send via a transport by an outbound endpoint, like http or jms etc..., the outbound properties of the message will be converted from outbound properties to inbound properties in next flow as soon as the message is received by inbound endpoint.

Now in the case,when you use a flow-ref to call a subflow, the outbound properties will not be changed since they are not converted to inbound properties, as you are not sending messages over any transport and they will remain as outbound properties only.

This is referred as Transport barrier as the message properties are getting changed crossing via transport



来源:https://stackoverflow.com/questions/28668943/need-clarification-on-transport-barrier-in-understanding-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!