zevv / nmqtt

Native Nim MQTT client library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subscription wildcards

mungosyme opened this issue · comments

Library does not seem to support subscription wildcards "#" or "+"

'#' should work. See the test:

test "subscribe to #":

But you are right, '+' is not supported yet.

👍

Yeah, that part is not implemented yet.

You can add it here with a regex:

nmqtt/nmqtt.nim

Lines 837 to 839 in a8e94a2

when not defined(broker):
for top, cb in ctx.pubCallbacks:
if top == topic or top == "#": cb.cb(topic, message)