streaming-integrator
streaming-integrator copied to clipboard
[HTTP/SSE]SSE source does not seem to retry to connect
Credits: Thank you @cazci for providing the siddhi app and SSE server for testing!
Description: I've created a Siddhi app with an SSE source and started it, before the SSE server was started. Did not show any errors on the SI tooling console until the SSE server was started. Furthermore, it did not connect with the SSE server when I started it later on.
Affected Product Version: wso2si-tooling-4.0.0-SNAPSHOT
OS, DB, other environment details and versions:
Mac OS 10.13.1 (17B1003)
Chrome Version 88.0.4324.146 (Official Build) (x86_64)
Steps to reproduce: Create the below Siddhi app in tooling server and start it. It was started with no errors printed on the SI tooling logs. After sometime, start the SSE server.
Expected behaviour: It was expected that the SSE source would keep retrying to connect to the SSE server. When the SSE server got available, SSE source would connect to it.
Actual behaviour: SSE source did not connect to the SSE server when it got online.
Siddhi app
@App:name("SSEApp")
@Source(type = 'sse', event.source.url='http://localhost:8080/sse',
@map(type='json'))
define stream RecieveProductionStream (date string);
@sink(type='log')
define stream LogProductionStream(date string);
from RecieveProductionStream
select *
insert into LogProductionStream
SSE server Mock Server.zip
To start this server, Download the Mock Server.zip file and extract it. Go to the extracted location and run the below two commands:
npm install
node server.js