Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 1.5 KB

README.md

File metadata and controls

42 lines (37 loc) · 1.5 KB

Subscription application using ZIO

This is a simple application that manages subscriptions requests:

  • Saves the subscription state in a database.
  • Notify about subscription changes in Kafka.

My idea is just to learn more about ZIO, I'm using as a guideline zio-petclinic

This app uses:

Run the application

  1. Start the services
    docker compose -f docker/docker-compose.yaml up -d
  2. Start sbt
    sbt
  3. Inside sbt, start the application
    reStart
  4. Visit the swagger page to list the endpoints
    http://localhost:8080/docs
  5. Inside sbt, stop the application
    reStop

Once the application starts you can send requests to create/delete/update subscriptions and Kafka messages will be produced, in those cases, in a topic called subscriptions notifying the changes, you can check those messages with tools like kcat:

kcat -C -b localhost:29092 -t subscriptions