我正在尝试使用 MessageProcessor 通过 WSO2 ESB 4.6.0 发送消息:
Proxy->Proxy(Store)->Processor->Sequence->Proxy
我在代理 #1 中设置了一个属性(' transport
'范围),将其发送到代理 #2 我可以成功记录它,但随后我通过采样处理器将消息传递给代理 #3,并且该属性正在丢失。
这是一个错误吗?如何通过处理器发送“传输”属性?
我希望value_1
出现而不是出现null
在 Proxy_3 中。
<messageProcessor name="Processor_1" class="org.apache.synapse.message.processors.sampler.SamplingProcessor" messageStore="Store_1" xmlns="http://ws.apache.org/ns/synapse">
<parameter name="interval">1000</parameter>
<parameter name="sequence">Sequence_1</parameter>
</messageProcessor>
消息存储
Store_1 is InMemoryMessageStore
代理_1
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy_1" transports="jms" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<property name="my_property_1" value="value_1" scope="transport"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence/>
<endpoint>
<address uri="http://localhost:8280/services/Proxy_2" format="soap11" />
</endpoint>
</target>
<parameter name="transport.jms.Destination">Queue</parameter>
</proxy>
代理_2
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy_2" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<property name="preserveProcessedHeaders" value="true"/>
<log level="custom" separator=",">
<property name="my_property_1" expression="get-property('transport', 'my_property_1')"/>
</log>
<store messageStore="Store_1"/>
</inSequence>
</target>
</proxy>
序列_1
<sequence xmlns="http://ws.apache.org/ns/synapse" name="Sequence_1">
<send>
<endpoint>
<address uri="http://localhost:8280/services/Proxy_3" format="soap11"/>
</endpoint>
</send>
</sequence>
代理_3
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy_3" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<log level="custom">
<property name="my_property_1" expression="get-property('transport', 'my_property_1')"/>
</log>
<send/>
</inSequence>
</target>
</proxy>