Open
Description
When using HTTP call and call response scenario we allow 2 sources with http.status.code = 200 and [2|4]00 to register in Siddhi app. However, when the response arrives, according to our current logic in findAndGetResponseSource
method we randomly pick a source from the map matching the regex and send a response. Please find a sample app to simulate this below.
define stream FooStream (message String, headers String);
@sink(type='http-request',publisher.url='http://localhost:8005/abc',
method='POST',
headers='{{headers}}',sink.id='source-1',
@map(type='json', @payload('{{message}}')))
Define stream BarStream (message String, headers String);
@source(type='http-response', sink.id='source-1', http.status.code='[2|4]00',
@map(type='json',@attributes(name='name', id='id')))
define stream responseStream1(name String, id int);
@source(type='http-response', sink.id='source-1', http.status.code='200',
@map(type='json',@attributes(name='name', id='id')))
define stream responseStream2(name String, id int);
We need to have a robust mechanism to handle such responses which need to be sent to multiple sources
Metadata
Metadata
Assignees
Labels
No labels