我有一个名为:的 LocalEntry Test,内容如下并保存在本地文件系统中。
<test>
<value1>a</value1>
</test>
Run Code Online (Sandbox Code Playgroud)
我可以value1使用这样的属性检索:
<property name="value" expression="get-property('Test')/*[local-name()='value1']/text()" type="string" scope="default" />
但是,我无法通过属性中介器或丰富中介器更改 LocalEntry 文件的内容,我的丰富配置如下:
<enrich>
<source clone="true" xpath="$ctx:newValue"/>
<target xpath="get-property('Test')/*[local-name()='value1']/text()"/>
</enrich>
Run Code Online (Sandbox Code Playgroud)
我在 ESB-5.0.0 中有这个确切的配置,它就像一个魅力。
为什么我不能在 EI-6.6.0 中做同样的事情?有什么替代解决方案吗?
我需要知道如何通过事件发布者从Enteprise Integrator到流处理器发布统计信息。
我在EI上执行了事件发布者的以下实现
<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="MessageFlowStatisticsPublisher"
statistics="enable" trace="enable" xmlns="http://wso2.org/carbon/eventpublisher">
<from streamName="org.wso2.esb.analytics.stream.FlowEntry" version="1.0.0"/>
<mapping customMapping="disable" type="wso2event"/>
<to eventAdapterType="wso2event">
<property name="username">admin</property>
<property name="protocol">thrift</property>
<property name="publishingMode">non-blocking</property>
<property name="publishTimeout">0</property>
<property name="receiverURL">tcp://xxx:7611</property>
<property encrypted="true" name="password">xxx</property>
</to>
</eventPublisher>
Run Code Online (Sandbox Code Playgroud)
在流处理器上,我有一个简单的siddhi应用程序,用于接收数据并将其打印到日志中,如下所示
@App:name("FlowEntryApp")
@App:description("Plan of flow entry")
@source(type='wso2event', @map(type = 'wso2event'))
define stream FlowEntry(compressed bool, tenantId int, messageId string, flowData string);
@sink(type='log', prefix='My flowEntry:')
define stream TestOutputFlowEntry(messageId string, flowData string);
@info(name='FlowEntryOutput')
from FlowEntry
select messageId, flowData
group by messageId
insert into TestOutputFlowEntry;
Run Code Online (Sandbox Code Playgroud)
另外,我将发布统计信息的所有配置都设置为代理服务的“启用统计信息”和“启用跟踪”。当我调用服务时,eventPublisher将wso2event发送到SP,这可以正常工作。但是在SP端,SP处理错误“缓存中存在streamId org.wso2.esb.analytics.stream.FlowEntry:1.0.0的没有StreamDefinition”
我知道,这个问题出在siddhi应用程序中,我定义了流“ FlowEntry”而不是“ …