You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**The core part of Watermill is the [Message]({{< ref "/docs/message" >}}).**
86
+
It is what `http.Request` is for the `net/http` package.
87
+
Most Watermill features work with this struct.
88
+
78
89
Watermill doesn't enforce any message format. `NewMessage` expects a slice of bytes as the payload.
79
90
You can use strings, JSON, protobuf, Avro, gob, or anything else that serializes to `[]byte`.
80
91
@@ -298,19 +309,6 @@ A more detailed explanation of how it is working (and how to add live code reloa
298
309
299
310
{{< /tabs >}}
300
311
301
-
## Three APIs
302
-
303
-
Watermill comes with three APIs for working with messages.
304
-
They build on top of each other, each step providing a higher-level API:
305
-
306
-
* At the bottom, the `Publisher` and `Subscriber` interfaces. It's the "raw" way of working with messages. You get full control, but also need to handle everything yourself.
307
-
* The `Router` is similar to HTTP routers you probably know. It introduces message handlers, saving you some boilerplate.
308
-
* The `CQRS` component adds generic handlers without needing to marshal and unmarshal messages yourself.
0 commit comments