无法使用以下命令处理响应,对于响应500:
@source(type='http-response', sink.id = 'serviceActivate', http.status.code = '5\d+', @map(type = 'json', @attributes(result = '$.result')))或
@source(type='http-response', sink.id = 'serviceActivate', http.status.code = '[2|4|5]00', @map(type = 'json', @attributes(result = '$.result')))我看到一个错误:
[2019-12-19 11:35:06,221] ERROR {org.wso2.extension.siddhi.io.http.source.HttpResponseMessageListener} - No source of type 'http-response' for status code '500' has been defined. Hence dropping the response message.对于连续的多个源,不使用regexp,没有错误:
@source(.... http.status.code = '200',.....)
@source(.... http.status.code = '400',.....)
@source(.... http.status.code = '500',.....)如何正确编写regexp?
发布于 2019-12-20 00:19:23
这似乎是由于bug,WSO2 SP 4.4.0是基于Siddhi核心4x,目前没有积极开发。我用最新的Siddhi Distribution 5.1.2测试了上面的内容,无法重现。有关siddhi 5x开发here的更多详细信息,请参阅。
发布于 2020-01-24 19:00:17
请尝试分别使用“2**”和“4**”的200和400范围状态的正则表达式。
https://stackoverflow.com/questions/59406540
复制相似问题