We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12a77ba commit 4c25f99Copy full SHA for 4c25f99
1 file changed
README.md
@@ -47,6 +47,16 @@ This is to ensure the program is non-blocking
47
err := <-eventBus.Listen()
48
```
49
50
+## To send a message
51
+Simply state the stream name and a map containing the message data.
52
+``` Go
53
+message := map[string]interface{}{
54
+ "user_id": "1a2b3c",
55
+ "user_name": "John Doe",
56
+}
57
+eventBus.Send("user.created", message)
58
+```
59
+
60
## To close the instance.
61
Waits for all messages acquired before closure to be processed or timeout, then closes the listener and connection.
62
``` Go
0 commit comments