Skip to content

genadigeno/emergency-service

Repository files navigation

Accident Management Service(AMS)

Project Description

Accident Management Service(AMS) is the project implemented with Event-Driven Architectural approach
that provides messages distribution across several services based on their event type, ACCIDENT_TYPE.
It is simulation of what happens when some kind of accident happens,
it can be criminal, car, fire or some kind of accident that are saved in some
(in case of default settings: accident.events) source topic.

Visual

alt text

Emergency Service application description

Emergency Service application reads and processes the incoming emergency events from specific sink topics
(in case of default settings: emergency.events) produced by event stream application. If some error arises
the application sends it to dead letter topic(in case of default settings: emergency.events-dlt) and continues process
for other ones. Since data processed successfully it will be stored in postgres SQL database.

Getting started

Installation requirements

In order to start up the application you need have installed:

  • Docker on you machine
  • git
    or
  • Apache kafka cluster with at least three brokers
  • git
  • maven 3.9.x
  • JDK-17

Installation steps

The project installation could be done using docker-compose.yml via command line interface (CMD):

git clone https://gitlab.com/genadigeno/emergency-service.git && 
cd emergency-service && 
docker compose up

or

git clone https://gitlab.com/genadigeno/emergency-service.git && 
cd emergency-service && 
mvn clean package
java -DPOSTGRES_URL=jdbc:postgresql://localhost:5432/postgres -DPOSTGRES_USER=postgres -DPOSTGRES_PASSWORD= -jar ./target/emergency-service.jar

JVM Parameters

  • SERVER_PORT - application port number, default: 8080
  • KAFKA_MAIN_TOPIC_NAME - kafka topic name for emergency service, default: emergency.events
  • KAFKA_DLT_TOPIC_NAME - kafka dead letter topic name for emergency service application, default: emergency.events-dlt
  • KAFKA_BOOTSTRAP_SERVERS - kafka cluster url, default: localhost:9092,localhost:9093
  • KAFKA_SCHEMA_REGISTRY_URL - schema registry url, default: http://localhost:8081
  • POSTGRES_URL - postgres url, default: jdbc:postgresql://localhost:5432/postgres
  • POSTGRES_USER - postgres user, default: postgres
  • POSTGRES_PASSWORD - postgres password

Used Technologies

  • img Event-Driven Architecture
  • img Java 17
  • img Spring Boot & Spring Boot JPA
  • img Apache Kafka & Kafka Streams library
  • img Docker
  • img Git
  • img Gitlab CI/CD

Project status

Completed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published