Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. Watermill

Watermill

MITGov1.5.2

A Go library for building event-driven applications with message streams, supporting various pub/sub implementations.

Visit WebsiteGitHubGitHub
9.8k stars500 forks0 contributors

What is Watermill?

Watermill is a Go library that simplifies building event-driven applications by providing tools to work efficiently with message streams. It solves the complexity of distributed systems communication, enabling patterns like event sourcing, CQRS, and sagas with a unified interface. Developers can use various pub/sub implementations such as Kafka, RabbitMQ, or even HTTP and SQL databases, making it versatile for different infrastructure needs.

Target Audience

Go developers building scalable, distributed services who need to implement event-driven architectures, message processing, or stream-based communication without deep expertise in low-level messaging protocols.

Value Proposition

Watermill stands out by offering a simple, universal API that abstracts the intricacies of message brokers, combined with proven stability, extensive middleware support, and high performance. It lowers the barrier to entry for event-driven development while providing the flexibility needed for production systems.

Overview

Building event-driven applications the easy way in Go.

Use Cases

Best For

  • Implementing event sourcing in Go microservices
  • Building CQRS (Command Query Responsibility Segregation) architectures
  • Creating sagas for distributed transaction management
  • Developing real-time feeds with WebSockets or Server-Sent Events
  • Synchronizing databases across services via message streams
  • Handling webhook ingestion and processing asynchronously

Not Ideal For

  • Projects built in languages other than Go
  • Simple monolithic applications without distributed messaging needs
  • Teams requiring direct, low-level access to specific message broker APIs
  • Ultra-high-frequency trading systems where microsecond latency is critical

Pros & Cons

Pros

Universal Backend Support

Supports Kafka, RabbitMQ, HTTP, PostgreSQL, and more through a unified interface, enabling flexibility in infrastructure choice without locking you into a single broker.

Simple Programming Model

Based on a clean handler function signature (`func(*Message) ([]*Message, error)`), making it intuitive for developers familiar with Go's HTTP handlers and reducing boilerplate.

Proven Stability

Includes comprehensive stress tests, race condition detection, and a stable API since v1.0.0, ensuring it's battle-tested for production environments.

Rich Ecosystem

Extensive middleware and plugin support for customizing behavior, such as metrics and resilience patterns, with many real-world examples provided.

Cons

Performance Overhead

The abstraction layer can reduce throughput compared to native broker clients, as benchmarks show GoChannel is significantly faster than broker-based Pub/Subs like RabbitMQ or Kafka.

Setup Complexity

Integrating with different Pub/Subs requires additional external libraries and configuration, which can be cumbersome and add to dependency management overhead.

Go-Only Limitation

Exclusively for Go, so it's not suitable for polyglot microservices architectures where other languages are involved, limiting its use in mixed-tech stacks.

Frequently Asked Questions

Quick Stats

Stars9,810
Forks500
Contributors0
Open Issues77
Last commit2 months ago
CreatedSince 2018

Tags

#stream-processing#event-driven#sagas#event-driven-architecture#cqrs#event-sourcing#distributed-systems#go-library#golang#rabbitmq#events#microservices#pub-sub#reactive#go

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 5 hours ago

Related Projects

AsynqAsynq

Simple, reliable, and efficient distributed task queue in Go

Stars13,546
Forks972
Last commit1 month ago
saramasarama

Sarama is a Go library for Apache Kafka.

Stars12,501
Forks1,851
Last commit7 hours ago
CentrifugoCentrifugo

Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably, socket.io, Phoenix.PubSub, SignalR. Set up once and forever.

Stars10,544
Forks723
Last commit1 day ago
gorushgorush

A push notification server written in Go (Golang).

Stars8,749
Forks886
Last commit19 hours ago
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