Processing Modular Events¶
PME is a modular event processing platform. An event-driven engine that ingests events in real-time and distributes them to independent modules.
Concept¶
The system works as a pipeline:
graph LR
A[Source] -->|POST /api/events| B[PME Core]
B -->|Kafka| C[Fraud Module]
B -->|Kafka| D[Analytics Module]
B -->|Kafka| E[Metrics Module]
B --> F[Elasticsearch]
- An event arrives via the core REST API
- The core persists it in Elasticsearch and publishes it on Kafka
- Subscribed modules receive and process it independently
Create a module¶
Use the template to get started, then edit module.yml:
name: my-module
version: 1.0.0
author: my-name
description: My module description
priority: MEDIUM
subscribes-to:
- TRANSACTION
And implement EventModule:
public class MyModule implements EventModule {
@Override
public ModuleConfig config() {
return ModuleConfigReader.load();
}
@Override
public void onEvent(Event event, EventContext context) {
context.log("Event received: {}", event.uuid());
}
}