wso2 / product-sp

An open source, cloud-native streaming data integration and analytics product optimized for agile digital businesses
https://wso2.com/analytics-and-stream-processing/
Apache License 2.0
120 stars 132 forks source link

Hot Redeploying Siddhi App With Http Request-Response produces errors #1051

Open sybernix opened 5 years ago

sybernix commented 5 years ago

Description: When the Response source has a regex as http.status.code after redeploying we dont receive the responses.

Affected Product Version: wso2sp-4.4.0 with siddhi-io-http-1.2.0

Steps to reproduce: Deploy the following siddhi app

@App:name("testLoad")
@App:description("Descripiosdfgdfgn")

@source(type='http', worker.count='20', receiver.url='http://localhost:5006/Sweet', @map(type = 'json'))
define stream inputStream(attr1 int);

@sink(type='http-request', sink.id='A1', publisher.url='http://www.mocky.io/v2/5dc1500133000075921a50fa', method='POST',headers="'Content-Type:text/xml'",blocking.io="true",
--@sink(type='http', publisher.url='http://localhost:8080/resource1/a/', method='POST',headers="'Content-Type:text/xml'",
@map(type='xml'))

--@sink(type='http', publisher.url='http://localhost:8688/service/EchoService', @map(type='json'))
define stream outputStream (attr1 int);

@sink(type='log')
define stream bar (attr1 int);

@source(type='http-response',sink.id='A1',http.status.code='[2|4]00', @map(type='json'))
@sink(type='log')
define stream JSONoutstream (attr1 int);

@source(type='http-response',sink.id='A1',http.status.code='500', @map(type='json'))
@sink(type='log')
define stream JSONoddutstream2 (attr1 int);

@info(name='query1')
from inputStream
select *
insert into outputStream;

from outputStream
select * insert into bar;

While running edit the siddhi app and redeploy it. Send a request again. Observe the errors