event-engine-core

Event Processing Engine project

License

License

Categories

Categories

Data
GroupId

GroupId

com.datarpm.sigma
ArtifactId

ArtifactId

event-engine-core
Last Version

Last Version

1.6.1
Release Date

Release Date

Type

Type

jar
Description

Description

event-engine-core
Event Processing Engine project

Download event-engine-core

How to add to project

<!-- https://jarcasting.com/artifacts/com.datarpm.sigma/event-engine-core/ -->
<dependency>
    <groupId>com.datarpm.sigma</groupId>
    <artifactId>event-engine-core</artifactId>
    <version>1.6.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.datarpm.sigma/event-engine-core/
implementation 'com.datarpm.sigma:event-engine-core:1.6.1'
// https://jarcasting.com/artifacts/com.datarpm.sigma/event-engine-core/
implementation ("com.datarpm.sigma:event-engine-core:1.6.1")
'com.datarpm.sigma:event-engine-core:jar:1.6.1'
<dependency org="com.datarpm.sigma" name="event-engine-core" rev="1.6.1">
  <artifact name="event-engine-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.datarpm.sigma', module='event-engine-core', version='1.6.1')
)
libraryDependencies += "com.datarpm.sigma" % "event-engine-core" % "1.6.1"
[com.datarpm.sigma/event-engine-core "1.6.1"]

Dependencies

compile (3)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.2.4
org.apache.activemq : activemq-camel jar 5.13.1
org.apache.activemq : activemq-kahadb-store jar 5.13.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

Sigma Event Engine

Quick start

Install

  1. Download event-engine-1.6-bin.tar.gz from releases page
  2. Extract
tar -xzf event-engine-1.6-bin.tar.gz
  1. Set the SIGMA_EVENTENGINE_HOME environment variable to point to extracted path
  2. Start service
cd event-engine-1.6/
./bin/eventengine-daemon.sh start

Starts websocket listener on port 8082 (ws://locahost:8082/event-stream)

Clients

Java

Using Maven:

<dependency>
    <groupId>com.datarpm.sigma</groupId>
    <artifactId>event-engine-core</artifactId>
    <version>1.6</version>
</dependency>

Generate event:

// prepare event builder
// code identifies event (action)
// example: USER_LOGGED_IN, USER_LOGGED_OUT, AUTHENTICATION_FAILURE
String code = "<EVENT_CODE_ID>";
EventBuilder eventBuilder = new EventBuilder(code);
// Set headers
// Used for event filtering
eventBuilder.addHeader("<headerKey>", "<headerValue>");
// Marks it as system event
SystemEventDetail systemEventDetails = new SystemEventDetail();
eventBuilder.generateSystemEvent(systemEventDetails);
// Event parameters
eventBuilder.addParam("<paramKey>", "<paramValue>");
eventBuilder.fireEvent();

Listen for an event:

EventMatchFilter matchFilter = new EventMatchFilter() {
  /*
   * Tests if specified eventHeader should be used for callback  
   */
  @Override
  public boolean allow(EventHeader eventHeader) {
    // Write filter logic
    return true;
  }
};

EventEngine.INSTANCE.addListner(matchFilter, new EventCallBack() {
  @Override
  public void onEvent(Event event) {
    // Do something
  }
});

Javascript

Refer to sigma-events-client-js

com.datarpm.sigma

DataRPM

Versions

Version
1.6.1
1.6