标签: siddhi

将统计信息从wso2 EI发布到wso2流处理器

我需要知道如何通过事件发布者从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”而不是“ …

wso2 complex-event-processing siddhi ei wso2sp

5
推荐指数
1
解决办法
475
查看次数

从wso2 Data Analytics Server中删除事件数据表

WSO2-DataAnalyticsServer-3.0.1通过以下步骤创建了一些测试表:
Edit Event> Streams> Next [presistEvent]
然后启用Persist Event Stream和Save.
这使得一个表格显示在InteractiveAnalytics> Data Explorer上.我想删除这个表,但我不知道如何以及在哪里我应该这样做.

wso2 siddhi apache-spark wso2-das

4
推荐指数
1
解决办法
725
查看次数

在字符串数据中只保留字母数字字符

我在流中获取字符串数据,我只想保留字母数字字符。我注意到 Siddhi 提供了一个 regexp 函数,正如这里提到的。但问题是它返回一个布尔值而不是修改后的字符串。有没有办法直接获取修改后的字符串?这是我的代码。

@App:name("strtest")
@App:description("Description of the plan")

-- Please refer to https://docs.wso2.com/display/SP400/Quick+Start+Guide on getting started with SP editor. 

define stream InboundStream(ipstring string);

@sink(type='log', prefix='Modified string')
define stream Opstream(ropstring bool);

from InboundStream 
select str:regexp(ipstring, "^A-Za-z0-9") as ropstring insert into Opstream;
Run Code Online (Sandbox Code Playgroud)

是否有返回修改后的正则表达式字符串的函数?

stream-processing siddhi event-stream-processing wso2sp

0
推荐指数
1
解决办法
123
查看次数