문제

뮬 로프트 페이지에서 설명한 흐름 변수와 세션 변수 간의 기능 차이 외에도 두 개를 사용하는 동안 유의 한 성능이 차이가 있습니까?

내 프로젝트의 경우 흐름 및 세션 변수를 사용하여 완벽하게 작동합니다.따라서 어떤 것을 결정할 수 있는지 결정해야합니다.

도움이 되었습니까?

해결책

세션 변수는 메시지를 교차하는 경계를 교차 할 때 끊임없이 직렬화되고 직렬화됩니다.

그러나 프로젝트에서 흐름 또는 세션 변수를 사용하여 수송 경계가 없음을 의미합니다 (그렇지 않으면 유량 변수를 잃을 것입니다).

이 경우 흐름과 세션 변수는 모두 동일하게 수행됩니다. 이벤트의 속성입니다.

세션 변수는 HTTP 끝점을 통해 유출되는 경향이 있으므로 사용법에주의하십시오.

다른 팁

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" 
    xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 
    xmlns="http://www.mulesoft.org/schema/mule/core" 
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-current.xsd
    http://www.mulesoft.org/schema/mule/core 
    http://www.mulesoft.org/schema/mule/core/current/mule.xsd
    http://www.mulesoft.org/schema/mule/http 
    http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
    http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
    <http:request-config name="HTTP_Request_Configuration" host="localhost" port="8034" doc:name="HTTP Request Configuration"/>
    <flow name="understandingvariablesFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/vars" doc:name="HTTP"/>
        <set-variable variableName="flv" value="flowVariable exists" doc:name="LocalVariable"/>
        <set-session-variable variableName="sessVar" value="sessionVariable exists" doc:name="Session Variable"/>
        <flow-ref name="practiceSub_Flow" doc:name="practiceSub_Flow"/>
        <flow-ref name="localVarible" doc:name="localVarible"/>
        <flow-ref name="practiceAnotherFLow" doc:name="practiceAnotherFLow"/>
        <http:request config-ref="HTTP_Request_Configuration" path="/localvar" method="POST" doc:name="HTTP"/>
    </flow>
    <flow name="localVarible">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/localvar" doc:name="HTTP"/>
        <logger message="#[flowVars.flv]" level="INFO" doc:name="LocalVarible Value"/>
        <logger message="#[sessionVars.sessVar]" level="INFO" doc:name="Session Var"/>
    </flow>
</mule>
-------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:secure-property-placeholder="http://www.mulesoft.org/schema/mule/secure-property-placeholder" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
    http://www.mulesoft.org/schema/mule/secure-property-placeholder http://www.mulesoft.org/schema/mule/secure-property-placeholder/current/mule-secure-property-placeholder.xsd
    http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
    http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
    http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
    <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8034" doc:name="HTTP Listener Configuration"/>
    <sub-flow name="practiceSub_Flow">
        <logger message="Another flow's sub flowPractice #[flowVars.flv] and #[sessionVars.sessVar]" level="INFO" doc:name="Sub flow"/>
    </sub-flow>
    <flow name="practiceAnotherFLow">
        <logger message="Another xml file flow's flowPractice #[flowVars.flv] and #[sessionVars.sessVar]" level="INFO" doc:name="Main Flow"/>
    </flow>
</mule>
.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top