What exactly is the transport scope in Property mediators in WSO2 esb?

我怕爱的太早我们不能终老 提交于 2019-12-12 05:03:46

问题


What exactly is the transport scope in Property mediators in WSO2 esb?
Is it thread safe? That is, if the scope is marked as transport, is this local to the current execution of the proxy ?
There does not seem to be enough documentation on this.


回答1:


Bellow information is extracted from the WSO2 ESB document itself and it has been documented. It is noting to do with the thread safe but more towards integration config level scope.

Scope

The scope at which the property will be set or removed from. Possible values are as follows.

Synapse: This is the default scope. The properties set in this scope last as long as the transaction (request-response) exists.

Transport: The properties set in this scope will be considered transport headers. For example, if it is required to send an HTTP header named 'CustomHeader' with an outgoing request, you can use the property mediator configuration with this scope.

Axis2: Properties set in this scope have a shorter life span than those set in the Synapse scope. They are mainly used for passing parameters to the underlying Axis2 engine

axis2-client: This is similar to the Synapse scope. The difference between the two scopes is that the axis2-client scope can be accessed inside the mediate() method of a mediator via a customs mediator created using the Class mediator. See axis2-client for further information.

Operation: This scope is used to retrieve a property in the operation context level. See XPath Extension Functions for a detailed explanation of each scope.




回答2:


When you specify a property in transport scope, the property is considered as a transport header. For example, you can use transport scope to retrieve an HTTP header in an HTTP request. Similarly you can also set a custom HTTP header in the response using a property with transport scope.

The properties are local to the the proxy.

See "Scope" in Property Mediator (WSO2 ESB Docs).



来源:https://stackoverflow.com/questions/34269918/what-exactly-is-the-transport-scope-in-property-mediators-in-wso2-esb

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