This sample demonstrates how to consume and event from an HTTP event source (client) and log the input message to the console. It uses JSON data mapping to read the data and publish the same to the log event sink.
- Deploy the sample via Tooling or to the server
- Execute the following CURL command
curl -X POST \
http://localhost:5005/SalesTotalsEP \
-H 'content-type: application/json' \
-d @input1.json
- Observe the following log entry in the server console output
INFO {io.siddhi.core.stream.output.sink.LogSink} - Sales Totals: : Event{timestamp=1602657048208, data=[2, DDwT, 12, 22, 112121], isExpired=false}