Skip to content

Match an event stream against a predefined set of patterns to identify complex events.

Notifications You must be signed in to change notification settings

jeangnc/complex-event-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

complex-event-processor

Match an event stream against a predefined set of access patterns to identify relevant events.

curl -X POST localhost:8080/expression \
    -H 'Content-Type: application/json ' \
    -d '{
	  "id": "complex-event-1",
	  "logical_expression": {
		"connector": "and",
		"operands": [
		  {
			"predicate": {
			  "id": "A",
			  "event_type": "EMAIL_OPENED",
			  "conditions": [
				{
				  "field": "age",
				  "operator": "less_than",
				  "value": 18
				},
				{
				  "field": "provider",
				  "operator": "not_equal",
				  "value": "gmail"
				}
			  ]
			}
		  },
		  {
			"predicate": {
			  "id": "B",
			  "event_type": "EMAIL_CLICKED",
			  "conditions": [
				{
				  "field": "link",
				  "operator": "equal",
				  "value": "http://google.com"
				}
			  ]
			}
		  }
		]
	  }
	}'

curl -X POST localhost:8080/event \
    -H 'Content-Type: application/json ' \
    -d '{
      "id": "1",
      "type": "EMAIL_OPENED",
      "timestamp": 1,
      "payload": {
        "email": "john@example.org"
      }
    }'

curl -X POST localhost:8080/event \
    -H 'Content-Type: application/json ' \
    -d '{
      "id": "1",
      "type": "EMAIL_OPENED",
      "timestamp": 1,
      "payload": {
        "age": 17,
        "provider": "hotmail"
      }
    }'

curl -X POST localhost:8080/event \
    -H 'Content-Type: application/json ' \
    -d '{
      "id": "2",
      "type": "EMAIL_CLICKED",
      "timestamp": 200,
      "payload": {
        "link": "http://google.com"
      }
    }'

About

Match an event stream against a predefined set of patterns to identify complex events.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published