Watermill alternatives and similar packages
Based on the "Messaging" category.
Alternatively, view watermill alternatives based on common mentions on social networks and blogs.
-
sarama
Sarama is a Go library for Apache Kafka. [Moved to: https://github.com/IBM/sarama] -
Centrifugo
Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever. -
machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing. -
NATS Go Client
Golang client for NATS, the cloud native messaging system. -
Confluent Kafka Golang Client
Confluent's Apache Kafka Golang client -
Mercure
An open, easy, fast, reliable and battery-efficient solution for real-time communications -
APNs2
⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol. -
Uniqush-Push
Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices. -
Chanify
Chanify is a safe and simple notification tools. This repository is command line tools for Chanify. -
amqp
An AMQP 0-9-1 Go client maintained by the RabbitMQ team. Originally by @streadway: `streadway/amqp` -
mangos
mangos is a pure Golang implementation of nanomsg's "Scalablilty Protocols" -
PingMe
PingMe is a CLI which provides the ability to send messages or alerts to multiple messaging platforms & email. -
emitter
Emits events in Go way, with wildcard, predicates, cancellation possibilities and many other good wins -
Bus
🔊Minimalist message bus implementation for internal communication with zero-allocation magic on Emit -
redisqueue
redisqueue provides a producer and consumer of a queue that uses Redis streams -
go-mq
Declare AMQP entities like queues, producers, and consumers in a declarative way. Can be used to work with RabbitMQ. -
go-events
:mega: Pure nodejs EventEmmiter for the Go Programming Language. -
drone-line
Sending line notifications using a binary, docker or Drone CI. -
nsq-event-bus
A tiny wrapper around NSQ topic and channel :rocket: -
RapidMQ
RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue -
Ratus
Ratus is a RESTful asynchronous task queue server. It translated concepts of distributed task queues into a set of resources that conform to REST principles and provides a consistent HTTP API for various backends. -
go-notify
Package notify provides an implementation of the Gnome DBus Notifications Specification. -
Commander
Build event-driven and event streaming applications with ease -
structured pubsub
Publish and subscribe functionality within a single process in Go. -
go-vitotrol
golang client library to Viessmann Vitotrol web service -
go-longpoll
Parked: PubSub queuing with long-polling subscribers (not bound to http) -
jazz
Abstraction layer for simple rabbitMQ connection, messaging and administration
Collect and Analyze Billions of Data Points in Real Time
Do you think we are missing an alternative of Watermill or a related project?
README
Watermill
Watermill is a Go library for working efficiently with message streams. It is intended for building event driven applications, enabling event sourcing, RPC over messages, sagas and basically whatever else comes to your mind. You can use conventional pub/sub implementations like Kafka or RabbitMQ, but also HTTP or MySQL binlog if that fits your use case.
Goals
- Easy to understand.
- Universal - event-driven architecture, messaging, stream processing, CQRS - use it for whatever you need.
- Fast (see Benchmarks).
- Flexible with middlewares, plugins and Pub/Sub configurations.
- Resilient - using proven technologies and passing stress tests (see Stability).
Getting Started
Pick what you like the best or see in order:
- Follow the Getting Started guide.
- See examples below.
- Read the full documentation: https://watermill.io/
Examples
- Basic
- [Your first app](_examples/basic/1-your-first-app) - start here!
- [Realtime feed](_examples/basic/2-realtime-feed)
- [Router](_examples/basic/3-router)
- [Metrics](_examples/basic/4-metrics)
- [CQRS with protobuf](_examples/basic/5-cqrs-protobuf)
- [Pub/Subs usage](_examples/pubsubs)
- These examples are part of the Getting started guide and show usage of a single Pub/Sub at a time.
- Real-world examples
- [Exactly-once delivery counter](_examples/real-world-examples/exactly-once-delivery-counter)
- [Receiving webhooks](_examples/real-world-examples/receiving-webhooks)
- [Sending webhooks](_examples/real-world-examples/sending-webhooks)
- [Synchronizing Databases](_examples/real-world-examples/synchronizing-databases)
- [Persistent Event Log](_examples/real-world-examples/persistent-event-log)
- [Transactional Events](_examples/real-world-examples/transactional-events)
- [Real-time HTTP updates with Server-Sent Events](_examples/real-world-examples/server-sent-events)
- Complete projects
Background
Building distributed and scalable services is rarely as easy as some may suggest. There is a lot of hidden knowledge that comes with writing such systems. Just like you don't need to know the whole TCP stack to create a HTTP REST server, you shouldn't need to study all of this knowledge to start with building message-driven applications.
Watermill's goal is to make communication with messages as easy to use as HTTP routers. It provides the tools needed to begin working with event-driven architecture and allows you to learn the details on the go.
At the heart of Watermill there is one simple interface:
func(*Message) ([]*Message, error)
Your handler receives a message and decides whether to publish new message(s) or return an error. What happens next is up to the middlewares you've chosen.
You can find more about our motivations in our Introducing Watermill blog post.
Pub/Subs
All publishers and subscribers have to implement an interface:
type Publisher interface {
Publish(topic string, messages ...*Message) error
Close() error
}
type Subscriber interface {
Subscribe(ctx context.Context, topic string) (<-chan *Message, error)
Close() error
}
Supported Pub/Subs:
- AMQP Pub/Sub (
github.com/ThreeDotsLabs/watermill-amqp/v2
) - Bolt Pub/Sub (
github.com/ThreeDotsLabs/watermill-bolt
) - Firestore Pub/Sub (
github.com/ThreeDotsLabs/watermill-firestore
) - Google Cloud Pub/Sub (
github.com/ThreeDotsLabs/watermill-googlecloud
) - HTTP Pub/Sub (
github.com/ThreeDotsLabs/watermill-http
) - io.Reader/io.Writer Pub/Sub (
github.com/ThreeDotsLabs/watermill-io
) - Kafka Pub/Sub (
github.com/ThreeDotsLabs/watermill-kafka/v2
) - NATS Pub/Sub (
github.com/ThreeDotsLabs/watermill-nats
) - SQL Pub/Sub (
github.com/ThreeDotsLabs/watermill-sql
)
All Pub/Subs implementation documentation can be found in the documentation.
Contributing
Please check our [contributing guide](CONTRIBUTING.md).
Stability
Watermill v1.0.0 has been released and is production-ready. The public API is stable and will not change without changing the major version.
To ensure that all Pub/Subs are stable and safe to use in production, we created a set of tests that need to pass for each of the implementations before merging to master. All tests are also executed in stress mode - that means that we are running all the tests 20x in parallel.
All tests are run with the race condition detector enabled (-race
flag in tests).
For more information about debugging tests, you should check tests troubleshooting guide.
Benchmarks
Initial tools for benchmarking Pub/Subs can be found in watermill-benchmark.
All benchmarks are being done on a single 16 CPU VM instance, running one binary and dependencies in Docker Compose.
These numbers are meant to serve as a rough estimate of how fast messages can be processed by different Pub/Subs. Keep in mind that the results can be vastly different, depending on the setup and configuration (both much lower and higher).
Here's the short version for message size of 16 bytes.
Pub/Sub | Publish (messages / s) | Subscribe (messages / s) |
---|---|---|
Kafka (one node) | 63,506 | 110,811 |
Kafka (5 nodes) | 70,252 | 117,529 |
NATS | 76,208 | 38,169 |
SQL (MySQL) | 7,299 | 154 |
SQL (PostgreSQL) | 4,142 | 98 |
Google Cloud Pub/Sub | 7,416 | 39,591 |
AMQP | 2,408 | 10,608 |
GoChannel | 272,938 | 101,371 |
Support
If you didn't find the answer to your question in the documentation, feel free to ask us directly!
Please join us on the #watermill
channel on the Three Dots Labs Discord.
Every bit of feedback is very welcome and appreciated. Please submit it using the survey.
Why the name?
It processes streams!
License
[MIT License](./LICENSE)
*Note that all licence references and agreements mentioned in the Watermill README section above
are relevant to that project's source code only.