Skip to content
Distributed SystemsBackendFull Stack

Kafka Event-Based Library Manager

Event-driven library system where availability changes propagate through Kafka.

Role
Designed and implemented the event-driven architecture

Overview

A library management system built around events rather than synchronous calls. When a book is borrowed, returned or reserved, the service publishes an event to Kafka; consumers update availability and drive an asynchronous notification pipeline, so the write path never waits on downstream work.

Problem & context

Availability tracking and user notifications are naturally asynchronous: a borrow request should not block while notifications fan out. The system was designed to explore that separation with a real message broker.

What I built

  • Spring Boot services producing domain events for book availability changes.
  • Kafka consumers that project those events into availability state.
  • An asynchronous notification pipeline fed by the same event stream.
  • A Next.js interface over the library catalogue and PostgreSQL persistence.

Architecture

Event-driven availability & notifications

The library service owns the write path and publishes domain events. Consumers subscribe independently, so notification delivery is decoupled from the borrow/return transaction.

  1. Next.js ClientCatalogue
  2. Library ServiceSpring Boot · Producer
  3. Apache KafkaEvent topics
  4. ConsumersAvailability · Notifications
  5. PostgreSQLProjected state
  • Producers publish book availability events on state change.
  • Consumers subscribe independently of the write path.
  • Notification delivery runs asynchronously off the same stream.

Engineering highlights

  • Producer/consumer separation with Kafka as the integration point.
  • Availability tracked through events rather than synchronous polling.
  • Asynchronous notification pipeline decoupled from user requests.

Technology stack

  • Java
  • Spring Boot
  • Apache Kafka
  • Next.js
  • PostgreSQL

Related projects