I do http request ({f_id:1001}
) to http service. Service return me only true/false in result without source f_id.
And want to select response of it with source F_ID:
@sink(type='http-request', publisher.url='http://127.0.0.1:3020/',
method="POST", sink.id='download-sink', @map(type='json'))
define stream OutputToNodejs(f_id long);
@source(type='http-response' , sink.id='download-sink',
http.status.code='200',
@map(type='json', @attributes('result')))
define stream responseStream2xx(result bool);
@info(name = 'SimpleLogTrigger')
from responseStream2xx
select result as text, f_id_from_request /* HOW GET F_ID from source request HERE */
insert into OutputStream2;
And I want to use source request message in select from source response. But how I can get source message here? If I cannot - may be I can forward some id of it from request to response?
There is no out of the box way to do this currently. There are two workarounds to get this done.