The Blabbr example with a wildcard doesn't make sense?
holyjak opened this issue · comments
Jakub Holý commented
I do not understand the Blabbr example with +
:
(mh/subscribe conn
["nba/scores/+"]
(fn [^String topic _ ^bytes payload]
(println (format "[consumer] received a message on topic %s: %s" topic (String. payload "UTF-8"))))
+
in this example matches a single segment, for example
nba/scores/aaron
nba/scores/bob
nba/scores/joe
Publishing in this example is not really different from the previous example
(mh/publish conn topic "BOS 101, NYK 89")
(mh/publish conn topic "ORL 85, ALT 88")
From what I see, we publish to "nba/scores"
and not to "nba/scores/(aaron|bob|joe)"
so having one subscriber with a wildcard doesn't make sense? Or am I missing something?
Michael Klishin commented
This is just an example. Feel free to use more sensible topics/patterns.