2024-02-16 17:35:31 -07:00
2024-02-16 17:35:31 -07:00

Dynanmic, Reactive Alerting API (Proof-of-Concept)

This project is a proof-of-concept API for a dynamic, reactive alerting system. It consists of four different modules that comprise the overall functionality of the project.

  • amqp
  • api
  • batch
  • persistence

Note that the notification component is not part of this proof-of-concept

Architecture

alerting architecture

Getting Started

  1. Clone the project. git clone git@github.com:Dark-Alex-17/alerting-poc.git
  2. Open the alerting-poc folder with IntelliJ. Use auto-import for a Gradle project.

Running the POC

Start the persistence tier

The persistence tier will start up the in-memory H2 database. Once started, Flyway will populate the database with the alerting schema and test data, and also the default Quartz schema.

Once H2 is up and running, a TCP server is started on port 9091 so other applications can use the database.

The H2 browser console is available at http://localhost:8081/h2-console

Start the Persistence Layer

./gradlew persistence:bootRun

Start the batch worker

The batch worker is what picks up messages from RabbitMQ and then schedules, and executes Quartz jobs.

The worker also creates the appropriate exchanges, queues, bindings, and all consumers.

./gradlew batch:bootRun

Start the Alerting API

The API is how users provision alerts and recipients, and all data is persisted to the H2 database.

Additionally, all operations send a message to RabbitMQ to provision and schedule Quartz jobs in the batch worker.

The API is available at http://localhost:8080/poc/alerting/v1/

The OpenAPI spec is available here.

./gradlew api:bootRun

Built With

Description
A simple API for a dynamic, reactive alerting system (minus the notification component).
Readme 3.4 MiB
Languages
Kotlin 67.7%
Java 32.3%