{"id":19548853,"url":"https://github.com/sbcd90/siddhi-kafka-cep","last_synced_at":"2025-10-13T10:05:29.881Z","repository":{"id":146466521,"uuid":"89416911","full_name":"sbcd90/siddhi-kafka-cep","owner":"sbcd90","description":"This is a simple CEP Engine leveraging the Kafka Streams platform","archived":false,"fork":false,"pushed_at":"2017-04-25T23:57:19.000Z","size":68,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-30T22:23:36.238Z","etag":null,"topics":["cep","kafka","siddhi","streams"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbcd90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-25T23:45:50.000Z","updated_at":"2025-04-24T19:41:42.000Z","dependencies_parsed_at":"2023-03-27T13:34:21.537Z","dependency_job_id":null,"html_url":"https://github.com/sbcd90/siddhi-kafka-cep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sbcd90/siddhi-kafka-cep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbcd90%2Fsiddhi-kafka-cep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbcd90%2Fsiddhi-kafka-cep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbcd90%2Fsiddhi-kafka-cep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbcd90%2Fsiddhi-kafka-cep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbcd90","download_url":"https://codeload.github.com/sbcd90/siddhi-kafka-cep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbcd90%2Fsiddhi-kafka-cep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014666,"owners_count":26085554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cep","kafka","siddhi","streams"],"created_at":"2024-11-11T03:57:12.104Z","updated_at":"2025-10-13T10:05:29.793Z","avatar_url":"https://github.com/sbcd90.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"siddhi-kafka-cep\n================\n\n- This is a simple CEP Engine leveraging the [Kafka Streams](http://docs.confluent.io/3.2.0/streams/) platform.\n\nKey Features\n============\n\n- This project integrates Kafka Streams with [WSO2 Siddhi CEP Engine](https://github.com/wso2/siddhi) and allows the\nusers to leverage the best features of both platforms.\n\n- The complex CEP patterns supported by Siddhi ([link](https://docs.wso2.com/display/CEP310/Queries)) can be used for\nprocessing events.\n\nGetting started\n===============\n\n- Compile the cep engine with maven.\n\n```\nmvn clean install\n```\n\n- Start the cep engine with the scripts in the `scripts` directory.\n\n- Create a siddhi rule using the command\n\n```\njava -cp example-1.0-SNAPSHOT-jar-with-dependencies.jar org.apache.kafka.SiddhiRuleGenerator\n```\n\n- Start the event receiver using the command\n\n```\njava -cp example-1.0-SNAPSHOT-jar-with-dependencies.jar org.apache.kafka.SiddhiStreamsDataReceiver\n```\n\n- Publish data to the Engine using the command\n\n```\njava -cp example-1.0-SNAPSHOT-jar-with-dependencies.jar org.apache.kafka.SiddhiStreamDataGenerator\n```\n\nArchitecture\n============\n\n![Alt text](CEP_design.PNG?raw=true \"Design\")\n\nApi\n===\n\n- The Java api documentation to create a new Siddhi Rule can be found [here](siddhi-kafka-rule-manager/src/main/java/org/apache/kafka/interfaces/SiddhiRuleProducer.java).\n\n- The Java api documentation to publish \u0026 receive data from the CEP Engine can be found [here](siddhi-kafka-streams-executor/src/main/java/org/apache/kafka/interfaces/SiddhiStreamsProducer.java)\n  \u0026 [here](siddhi-kafka-streams-executor/src/main/java/org/apache/kafka/interfaces/SiddhiStreamsConsumer.java).\n\nExamples\n========\n\n- Examples for using the Java api s can be found the [example](example) directory.\n\n\nUsing Kafka Producers \u0026 Consumers\n=================================\n\n- The standard Kafka Producers \u0026 Consumers can also be used to publish \u0026 retrieve\ndata out of this engine.\n\n\n\nRest Api\n========\n\n- A simple REST server is included with this project.\n\n## Getting started with the Rest server\n\n- Run the maven jetty plugin to start the server.\n\n```\nmvn jetty:run\n```\n\n## Payloads\n\n- To create a Siddhi Rule:\n\n  POST http://localhost:8080/cep/{streamId}/rule\n\n  Body:\n  \n  ```\n   {\n   \t\"topic\": \"t1\",\n   \t\"bootstrapServers\": \"localhost:9092\",\n   \t\"definitions\": [\"define stream siddhiStream1 (symbol string, price double, volume long);\"],\n   \t\"rule\": \"@info(name = 'query1') from siddhiStream1[price \u003c 20.0] select symbol, price, volume insert into outputStream\"\n   }\n  ```\n  \n- To post streams of data:\n\n  POST http://localhost:8085/cep/{streamId}/stream/data \n \n  Body:\n  \n  ```\n    {\n    \t\"topic\": \"t1\",\n    \t\"bootstrapServers\": \"localhost:9092\",\n    \t\"data\": [[\"Rectangle\", 19.0, 19], [\"Square\", 21.0, 21]]\n    }\n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbcd90%2Fsiddhi-kafka-cep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbcd90%2Fsiddhi-kafka-cep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbcd90%2Fsiddhi-kafka-cep/lists"}