Mule - 会话变量在sftp:outbound-endpoint之后丢失

时间:2014-03-28 23:08:17

标签: mule

运行以下配置,我在sftp出站端点之前设置了一个会话变量,之后它就不再可用了。我认为会话变量是跨越运输障碍的?我做错了吗?

<set-session-variable variableName="total" value="#[payload.size()]" />
        <foreach>
            <!-- Omitted for brevity -->
        </foreach>


        <sftp:outbound-endpoint encoding="UTF-8"
            connector-ref="sftp-out" exchange-pattern="request-response" outputPattern="#[flowVars.filename]"
            host="${sftp.host}" port="${sftp.port}" path="${sftp.output.path}" user="${sftp.username}"
            responseTimeout="60000" identityFile="${app.home}/${sftp.keyPath}" passphrase="${sftp.passphrase}" />

<logger level="INFO" message="#[sessionVars.total]" />

1 个答案:

答案 0 :(得分:0)

通过传输障碍可用,这意味着在通过VM出站端点在同一服务器(相同的应用程序或不同的应用程序)内发送消息时仍然可用。 这对于在流中共享行为,使用事务,进行异步处理或在集群中分配负载非常有用。 问候。