Examples for the article: Event-driven Microservices & Event Processing
Java
Latest commit 869213d Aug 10, 2016 @bertholdschulte bertholdschulte fix typos
Permalink
Failed to load latest commit information.
.mvn/wrapper inital commit Jun 17, 2016
src introduce filter for incomming events Aug 9, 2016
.gitignore polish and docs Aug 8, 2016
README.md fix typos Aug 10, 2016
environment-notes.md polish and docs Aug 8, 2016
pom.xml config params, docs, polish Aug 5, 2016

README.md

Event Processing in a lightweight context

Purpose & Scope

The project outlines the usage of event processing within an event-driven architecture (EDA) in a lightweight way.

Note:

This project contains the examples of the article: Event-driven Microservices & Event Processing. The code is just for demonstration purposes – it is not production ready. The nomenclature does not distinguish between the terms complex event processing (CEP) and event stream processing (ESP). ESP is rather treated as a subset of CEP.

Application

The event channel of the EDA is realized by the message-broker Apache Kafka. The CEP part is based on the event processing engine and event processing language from Esper. The Esper component of the EIP framework Apache Camel connects the event channel to the event processing engine. Additionally the Elastic stack is used to visualize some results/statistics of events that occurred.

The example can be started as a spring boot application. The class CepExampleApplication.java is the boot-class of the application.

Packages

  • de.codecentric.channel – contains the event-channel integration
  • de.codecentric.events – contains a few example events and a simplified event-structure to keep events standardized in the system. However Esper has it's own event-structure internally
  • de.codecentric.processing – contains routes to create faked shopping-cart events and CEP examples which do complex event processing on the cart events

Build

mvn install

Deploy

A few hints to setup a testable environment and how to test the application are summarized in the environment-notes.

Test the application

Start the application in your IDE or via command-line as an Spring Boot application. The application produces faked shopping carts CreateCartsRoute which are published to the event-channel. Furthermore the application reads from the event-channel, evaluates the incomming events and occasionally produces derived events. Consult the source code of CepExamplesRoute for details.