snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s
Some checks failed
master / ci (push) Failing after 0s
This commit is contained in:
12
docs/content/development/benchmark.md
Normal file
12
docs/content/development/benchmark.md
Normal file
@@ -0,0 +1,12 @@
|
||||
+++
|
||||
title = "Benchmark"
|
||||
description = "Watermill Benchmark"
|
||||
weight = 250
|
||||
draft = false
|
||||
bref = "Watermill Benchmark"
|
||||
+++
|
||||
|
||||
You can find benchmarking tools and results in the [github.com/ThreeDotsLabs/watermill-benchmark](https://github.com/ThreeDotsLabs/watermill-benchmark) repository.
|
||||
|
||||
**Note, they are meant as rough estimate and should not be used to decide which Pub/Sub is the best choice.**
|
||||
Performance depends on many factors, including configuration, and it's always best to test performance in your own environment.
|
||||
53
docs/content/development/contributing.md
Normal file
53
docs/content/development/contributing.md
Normal file
@@ -0,0 +1,53 @@
|
||||
+++
|
||||
title = "Contributing Guide"
|
||||
description = "Contribute to Watermill"
|
||||
weight = 100
|
||||
bref = "Contribute to Watermill"
|
||||
+++
|
||||
|
||||
## How can I help?
|
||||
|
||||
We are always happy to help you in contributing to Watermill. If you have any ideas, please let us know on our [Discord server](https://watermill.io/support/).
|
||||
|
||||
There are multiple ways in which you can help us.
|
||||
|
||||
### Existing issues
|
||||
|
||||
You can pick one of the existing issues. Most of the issues should have an estimation (S - small, M - medium, L - large).
|
||||
|
||||
- [Good first issues list](https://github.com/ThreeDotsLabs/watermill/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - simple issues to begin with
|
||||
- [Help wanted issues list](https://github.com/ThreeDotsLabs/watermill/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) - tasks that are already more or less clear, and you can start to implement them pretty quickly
|
||||
|
||||
### New Pub/Sub implementations
|
||||
|
||||
If you have an idea to create a Pub/Sub based on some technology and it is not listed yet in our issues (because we don't know it, or it is just some crazy idea, like physical mail based Pub/Sub), feel free to add your own implementation.
|
||||
|
||||
You can do it in your private repository and later, if you want, we can move it to `ThreeDotsLabs/watermill-[name]`.
|
||||
You will keep the maintainer permissions to the repository, and we'll invite you to a maintainers-only discord channel.
|
||||
|
||||
When adding a new Pub/Sub implementation, you should start with [Implementing a new Pub/Sub]({{< ref "pub-sub-implementing" >}}).
|
||||
|
||||
### New ideas
|
||||
|
||||
If you have any idea that is not covered in the issues list, please post a new issue describing it.
|
||||
It's recommended to discuss your idea on [Discord](https://discord.gg/QV6VFg4YQE)/GitHub before creating production-ready implementation - in some situations, it may save a lot of your time before implementing something that can be simplified or done more easily. :)
|
||||
|
||||
In general, it's helpful to discuss a Proof of Concept to align with the idea.
|
||||
|
||||
## Local development
|
||||
|
||||
Makefile and docker-compose (for Pub/Subs) are your friends. You can run all tests locally (they are running in CI in the same way).
|
||||
|
||||
Useful commands:
|
||||
- `make up` - docker-compose up
|
||||
- `make test` - tests
|
||||
- `make test_short` - run short tests (useful to perform a very fast check after changes)
|
||||
- `make fmt` - do goimports
|
||||
|
||||
## Code standards
|
||||
|
||||
- you should run `make fmt`
|
||||
- [CodeReviewComments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html)
|
||||
- SOLID
|
||||
- code should be open for configuration and not coupled to any serialization method (for example: [AMQP marshaler](https://github.com/ThreeDotsLabs/watermill-amqp/blob/master/pkg/amqp/marshaler.go), [AMQP Config](https://github.com/ThreeDotsLabs/watermill-amqp/blob/master/pkg/amqp/config.go)
|
||||
40
docs/content/development/pub-sub-implementing.md
Normal file
40
docs/content/development/pub-sub-implementing.md
Normal file
@@ -0,0 +1,40 @@
|
||||
+++
|
||||
title = "Implementing a new Pub/Sub"
|
||||
description = "Bring Your Own Pub/Sub"
|
||||
date = 2018-12-05T12:48:34+01:00
|
||||
weight = 200
|
||||
draft = false
|
||||
bref = "Bring Your Own Pub/Sub"
|
||||
+++
|
||||
|
||||
## The Pub/Sub interface
|
||||
|
||||
To add support for a custom Pub/Sub, you have to implement both `message.Publisher` and `message.Subscriber` interfaces.
|
||||
|
||||
{{% load-snippet-partial file="src-link/message/pubsub.go" first_line_contains="type Publisher interface" last_line_contains="type SubscribeInitializer" padding_after="0" %}}
|
||||
|
||||
## Testing
|
||||
|
||||
Watermill provides [a set of test scenarios](https://github.com/ThreeDotsLabs/watermill/blob/master/pubsub/tests/test_pubsub.go)
|
||||
that any Pub/Sub implementation can use. Each test suite needs to declare what features it supports and how to construct a new Pub/Sub.
|
||||
These scenarios check both basic usage and more uncommon use cases. Stress tests are also included.
|
||||
|
||||
## TODO list
|
||||
|
||||
Here are a few things you shouldn't forget about:
|
||||
|
||||
1. Logging (good messages and proper levels).
|
||||
2. Replaceable and configurable message marshaler.
|
||||
3. `Close()` implementation for the publisher and subscriber that is:
|
||||
- idempotent
|
||||
- working correctly even when the publisher or the subscriber is blocked (for example, waiting for an Ack).
|
||||
- working correctly when the subscriber output channel is blocked (because nothing is listening on it).
|
||||
4. `Ack()` **and** `Nack()` support for consumed messages.
|
||||
5. Redelivery on `Nack()` for a consumed message.
|
||||
6. Use [Universal Pub/Sub tests]({{< ref "/docs/pub-sub#universal-tests" >}}). For debugging tips, you should check [tests troubleshooting guide](/docs/troubleshooting/#debugging-pubsub-tests).
|
||||
7. Performance optimizations.
|
||||
8. GoDocs, [Markdown docs]({{< ref "/pubsubs" >}}) and [Getting Started examples](/learn/getting-started).
|
||||
|
||||
We will also be thankful for submitting a [pull request](https://github.com/ThreeDotsLabs/watermill/pulls) with the new Pub/Sub implementation.
|
||||
|
||||
If anything is not clear, feel free to use any of our [support channels]({{< ref "/support" >}}) to reach us, we will be glad to help.
|
||||
10
docs/content/development/releases.md
Normal file
10
docs/content/development/releases.md
Normal file
@@ -0,0 +1,10 @@
|
||||
+++
|
||||
title = "Releases"
|
||||
description = "Watermill Releases"
|
||||
weight = 300
|
||||
bref = "Watermill Releases"
|
||||
+++
|
||||
|
||||
You can read about the historical Watermill releases in [the posts on the Three Dots Labs blog](https://threedots.tech/series/watermill-release-post/).
|
||||
|
||||
<iframe src="https://releases.threedots.tech" frameborder="0" style="border: 0; width: 100%; height: 1000px"></iframe>
|
||||
Reference in New Issue
Block a user