Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Domain-Driven Design
  3. Message DB

Message DB

MITShellv1.3.0

A PostgreSQL-based event store and message store for pub/sub, event sourcing, and microservices applications.

Visit WebsiteGitHubGitHub
1.7k stars63 forks0 contributors

What is Message DB?

Message DB is a microservice-native event store and message store implemented in PostgreSQL. It provides a complete solution for pub/sub messaging, event sourcing, and event-driven microservices by storing messages as JSON in dedicated database tables with functions for writing and reading streams.

Target Audience

Developers and architects building event-driven microservices, event-sourced systems, or pub/sub messaging infrastructures who want a database-native solution without external dependencies.

Value Proposition

It offers a minimalist, self-contained alternative to complex systems like Kafka or Event Store, leveraging PostgreSQL's reliability and JSON capabilities while providing essential messaging patterns and easy self-hosting.

Overview

Microservice native message and event store for Postgres

Use Cases

Best For

  • Implementing event sourcing in microservices architectures
  • Building pub/sub messaging systems within PostgreSQL
  • Creating event-driven applications without external message brokers
  • Developing consumer group patterns for scalable message processing
  • Storing and querying event streams with JSON metadata
  • Self-hosting a lightweight alternative to Kafka or Event Store

Not Ideal For

  • Applications requiring massive-scale, high-throughput messaging beyond PostgreSQL's capabilities (e.g., IoT data ingestion at millions of events per second)
  • Projects not using PostgreSQL that would incur significant overhead from adopting it solely for messaging
  • Cloud-native environments where managed messaging services (e.g., AWS SQS, Google Pub/Sub) offer better operational simplicity and integration

Pros & Cons

Pros

Database-Native Simplicity

Implements messaging directly in PostgreSQL, eliminating external dependencies and leveraging existing database infrastructure for deployment ease.

Robust Event Sourcing

Ensures gapless stream positions in the messages table, which is critical for reliable event replay and consistency in event-sourced systems.

Flexible JSON Handling

Uses PostgreSQL's JSONB type for message data and metadata, allowing efficient storage, querying, and schema-less flexibility as shown in the API examples.

Built-in Consumer Groups

Supports cooperative message processing via functions like get_category_messages with consumer_group parameters, enabling scalable microservice architectures without extra tooling.

Cons

PostgreSQL Lock-in

The entire system is tightly coupled to PostgreSQL's functions and schema, making migration to other databases nearly impossible and limiting technology flexibility.

Scalability Constraints

Relies on PostgreSQL's single-instance scalability, which may bottleneck under ultra-high message volumes compared to distributed systems like Kafka, as admitted in the rationale.

Custom Client Development

Requires developers to write their own clients for each language, since the API is based on PostgreSQL functions with limited pre-built libraries beyond Ruby and NPM packages.

Open Source Alternative To

Message DB is an open-source alternative to the following products:

A
Apache Kafka
E
Event Store

Event Store is a database built for event sourcing, designed to store events as an immutable sequence over time. It provides a high-performance storage engine for event-driven architectures and supports the Event Sourcing pattern.

Frequently Asked Questions

Quick Stats

Stars1,651
Forks63
Contributors0
Open Issues20
Last commit2 years ago
CreatedSince 2019

Tags

#event-driven#database#event-driven-architecture#postgres#message-queue#event-store#event-sourcing#jsonb#event-stream#postgresql#microservices#pub-sub

Built With

R
Ruby
P
PostgreSQL
J
JavaScript

Links & Resources

Website

Included in

Domain-Driven Design12.2k
Auto-fetched 9 hours ago

Related Projects

SerializedSerialized

Complete platform for Event Sourcing & CQRS

Stars0
Forks0
Last commit
Event StoreEvent Store

The open-source, functional database with Complex Event Processing in JavaScript

Stars0
Forks0
Last commit
EventsourcingEventsourcing

Business event capture and querying framework

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub