siddhi icon indicating copy to clipboard operation
siddhi copied to clipboard

Inactive Siddhi Application Processes Events

Open Anoukh opened this issue 7 years ago • 0 comments

Description: Although Siddhi applications deployed in inactive state don't connect to Sources and Sinks, events can be sent into the runtime using simulation API

Suggested Labels: Bug

Suggested Assignees: @grainier @mohanvive

Affected Product Version: 4.0.0

OS, DB, other environment details and versions:
Ubuntu 16.04

Steps to reproduce: Enable 2 Node minimum HA and deploy a Siddhi application only in the Passive node. This would mean that the Siddhi Application is deployed in inactive state in the passive node, where Sources are not connected.

Sample Siddhi application to deploy:

@App:name("SmartHomePlan")

@Source(type = 'tcp', context='SmartHomeData', @map(type='binary')) define stream SmartHomeData (id string, value float);

from SmartHomeData#window.length(5) select id as id, max(value) as value insert into OutputStream;

from OutputStream#log("Event: ") insert into IgnoreOutputStream;

Next use the following command in the terminal to simulate events

curl -X POST \ http://localhost:9091/simulation/single \ -H 'content-type: text/plain' \ -d '{ "siddhiAppName": "SmartHomePlan", "streamName": "SmartHomeData", "data": [ "WSO2", "500.0" ] }'

Note: The netty configuration should be so that the listening http port is 9091

Anoukh avatar Oct 22 '17 16:10 Anoukh