Skip to content

Commit

Permalink
[doc] [#314] Fix wiki typos (@mardukbp)
Browse files Browse the repository at this point in the history
  • Loading branch information
mardukbp authored and ptaoussanis committed Aug 18, 2024
1 parent fbdd5aa commit b02201e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wiki/2-Further-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Carmine has a flexible **listener API** to support persistent-connection feature
"channel*" (fn f2 [msg] (println "f2:" msg))
"ch*" (fn f3 [msg] (println "f3:" msg))}
(car/subscribe "channel1")
(car/psubscribe "channel*" "ch*)))
(car/psubscribe "channel*" "ch*")))
```

Exactly 1 handler fn will trigger per published message *exactly* matching each active subscription:
Expand All @@ -70,7 +70,7 @@ So publishing to "channel1" in this example will trigger all 3x handlers:
You can adjust subscriptions and/or handlers:

```clojure
(with-open-listener my-listener
(car/with-open-listener my-listener
(car/unsubscribe) ; Unsubscribe from every channel (leaving patterns alone)
(car/subscribe "channel3"))

Expand Down

0 comments on commit b02201e

Please sign in to comment.