无法使用Siddhi中的'regex'http.status.code处理响应

问题描述 投票:0回答:1

无法使用响应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.

对于连续的多个源,不使用正则表达式,没有错误:

@source(.... http.status.code = '200',.....)
@source(.... http.status.code = '400',.....)
@source(.... http.status.code = '500',.....)

如何正确编写正则表达式?

siddhi
1个回答
0
投票

WSO2 SP 4.4.0基于Siddhi核心4x,目前尚未积极开发。我用最新的Siddhi Distribution 5.1.2测试了以上内容,无法重现。查看有关siddhi 5x开发here的更多详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.