From 47371f5e4c9a5d9569734a3ece2dd43a56856964 Mon Sep 17 00:00:00 2001 From: "niten\" (aider)" Date: Sun, 8 Jun 2025 10:31:21 -0700 Subject: [PATCH] docs: Add example for listening on subscribed channel and printing messages --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7cef161..54d8074 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,14 @@ To subscribe to a topic and receive messages: (def chan (milquetoast.api/subscribe! client "test/topic")) ``` -You can then take messages from the channel as they arrive. +You can then take messages from the channel as they arrive. Here's an example of how to listen on the channel and print the messages: + +```clojure +(go-loop [] + (when-let [msg (