简体   繁体   English

什么是wso2 cep中的元数据相关数据和有效载荷数据

[英]what is meta data correlation data and payload data in wso2 cep

what is meta data correlation data and payload data in wso2 cep 什么是wso2 cep中的元数据相关数据和有效载荷数据

I understood that these are 3 different types of data types in stream but which one has benefits over another that is not clear from any documentation. 我知道这些是流中的3种不同类型的数据类型,但是哪一种具有优于另一种的优点,这在任何文档中都是不清楚的。 Or how can we use it in different situations. 或者我们如何在不同的情况下使用它。

All the operations that can be performed on payload data, I could also do on meta and correlation data as well. 可以对有效载荷数据执行的所有操作,我也可以对元数据和相关数据执行。

Can someone explain difference with examples. 有人可以解释与例子的区别。

There is no difference in how each of these attributes behave internally in WSO2 CEP. 在WSO2 CEP中,每个属性在内部的行为方式没有区别。 This is simply a logical separation to let a user define streams with meta attributes, correlation attributes and payload separately. 这只是一个逻辑分离,让用户分别定义具有元属性,相关属性和有效负载的流。 You can use these attribute types if you need the logical separation or simply send data as payload if there is no need for separation of meta data and correlation data. 如果需要逻辑分离,则可以使用这些属性类型,或者如果不需要分离元数据和相关数据,则只需将数据作为有效负载发送。

You can store meta data related to a stream in meta data. 您可以在元数据中存储与流相关的元数据。 eg attributes like event_timestamp, ip_address of a request or similar. 例如,event_timestamp,请求的ip_address或类似的属性。 Similarly for correlation data, you can put attributes that are used to correlate events with other events from other streams. 类似地,对于关联数据,您可以将用于关联事件的属性与其他流中的其他事件相关联。 eg something like a correlation_id. 例如,像rela_id这样的东西。 These attributes would be useful when you perform join operations on a stream. 在流上执行连接操作时,这些属性将非常有用。

However, please note that the Siddhi engine used within CEP does not differentiate streams based on meta, correlation, payload and processes all attributes without any distinction. 但请注意,CEP中使用的Siddhi引擎不会根据元数据,相关性,有效负载和所有属性对流进行区分,而不会有任何区别。 The attribute types are available for streams defined at event-builder/event-formatter level which are mapped to flat Siddhi streams at runtime for processing queries. 属性类型可用于在event-builder / event-formatter级别定义的流,这些流在运行时映射到平面Siddhi流以处理查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM