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
Copy file name to clipboardExpand all lines: docs/extending-taskiq/broker.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,20 @@ Here is a template for new brokers:
11
11
12
12
@[code python](../examples/extending/broker.py)
13
13
14
+
15
+
# About kick and listen
16
+
17
+
The `kick` method takes a `BrokerMessage` as a parameter. The `BrokerMessage` class is a handy helper class for brokers. You can use information from the BrokerMessage to alter the delivery method.
18
+
19
+
::: warning "cool warning!"
20
+
21
+
As a broker developer, please send only raw bytes from the `message` field of a BrokerMessage if possible. Serializing it to the string may result in a problem if message bytes are not utf-8 compatible.
22
+
23
+
:::
24
+
25
+
26
+
The `listen` method should yield raw bytes that were sent over the network.
27
+
14
28
## Conventions
15
29
16
30
For brokers, we have several conventions. It's good if your broker implements them.
0 commit comments