Light implementation of Event Sourcing using PostgreSQL as event store
Hi everyone, If you have a Java Spring Boot application with a PostgreSQL database, you can implement Event Sourcing without introducing new specialized databases or frameworks. If you have an application dealing with an entity called Order, you should adopt Event Sourcing to keep track of all changes, and know how the Order got into the current state. Event Sourcing gives you: 1. the true history of the system (audit and traceability), 2. the ability to put the system in any prior state (debugging), 3. the ability to create read projections from events as needed to respond to new demands.…
In plain words
This is a Java Spring Boot library that implements Event Sourcing using PostgreSQL as the event store, eliminating the need for specialized databases or frameworks. It enables developers to track all changes to entities, maintaining a complete audit trail and the ability to reconstruct prior system states. The tool allows creation of read projections from events to meet new requirements. It is designed for teams already using PostgreSQL who want to adopt Event Sourcing patterns without introducing additional dependencies.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
Hi everyone, If you have a Java Spring Boot application with a PostgreSQL database, you can implement Event Sourcing without introducing new specialized databases or frameworks. If you have an application dealing with an entity called Order, you should adopt Event Sourcing to keep track of all changes, and know how the Order got into the current state. Event Sourcing gives you: 1. the true history of the system (audit and traceability), 2. the ability to put the system in any prior state (debugging), 3. the ability to create read projections from events as needed to respond to new demands. There are several well-known specialized frameworks and databases for Event Sourcing: EventStoreDB, Marten, Eventuate, to name a few. But adopting a new framework or database you are not familiar with may stop you from trying the Event Sourcing pattern in your project. But you can actually implement Event Sourcing with a few classes and use PostgreSQL as an event store. The "postgresql-event-sourcing" project is a reference implementation of an event-sourced system that uses PostgreSQL as an event store built with Spring Boot. Fork the repository and use it as a template for your projects. Or clone the repository and run end-to-end tests to see how everything works together. The project describes in detail: - database model for storing events, - synchronous and asynchronous event handlers, - CQRS, - Transactional Outbox pattern, - Polling Publisher pattern, - optimized publisher that uses PostgreSQL LISTEN/NOTIFY capabilities, - and more. This project can be easily extended to comply with your domain model. The source code is available on GitHub <https://github.com/eugene-khyst/postgresql-event-sourcing>.
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, October 2023
the whole month →
Nudge 2.0▲1,051In-app experiences to activate, retain, & understand users
Growth · 2023 · nudgenow.com


Unlock AI magic for elevated customer engagement, fast
AI · 2023 · tiledesk.com

- OD
Effortlessly discover API behaviour with a Chrome extension that automatically generates OpenAPI specifications in real time for any app or website.
Dev tools · 2023 · github.com