Reputation: 21
Here I have a siddhi application setup like below:
I have saved it and started it. I am trying to start an event in the cmd as shown below:
But I get this error;
Any idea as to how it may be fixed?
my understanding of this subject is rather limited and I am unsure as to what is wrong, any help would be greatly appreciated :)
Upvotes: 0
Views: 89
Reputation: 14574
Here is a sample for HTTP events with a log Sink with a JSON payload.
@Source(type = 'http',
receiver.url='http://localhost:8006/productionStream',
basic.auth.enabled='false',
@map(type='json'))
define stream SweetProductionStream (name string, amount double);
@sink(type='log')
define stream OutputStream (name string, amount double);
@info(name='passThrough')
from SweetProductionStream
select *
insert into OutputStream;
curl
curl -X POST -d "{\"event\":{\"name\":\"Cake\",\"amount\":20.12}}" http://localhost:8006/productionStream --header "Content-Type:application/json"
Upvotes: 1