Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] subscribe to multi level topic mosquitto (using auth plugin)

Hi guys , I will try to explaing my question with an example
this works ok:
subs
mosquitto_sub -h srv -p 3025  -t multi/#
push
mosquitto_pub -h srv -p 3025  -t "multi/testtt"  -m "comando2"
receive:
commando2.
but:
Using mosquito auth plugin and following ACLs. (not showing user table but is there)
mysql> select * from acls where users_id = 217;
+-----+-------------------------+-----------------------------------------------+----+----------+
| id  | username                | topic                                         | rw | users_id |
+-----+-------------------------+-----------------------------------------------+----+----------+
| 631 | ca43c7cb0c069e9fc5d8d6c | multi/#                                       |  1 |      217 |
+-----+-------------------------+-----------------------------------------------+----+----------+


mysql> select * from acls where users_id = 218;
+-----+-------------------------+-----------------------------------------------+----+----------+
| id  | username                | topic                                         | rw | users_id |
+-----+-------------------------+-----------------------------------------------+----+----------+
| 632 | 03030a08bb211590714949d | multi/test                                    |  2 |      218 |
+-----+-------------------------+-----------------------------------------------+----+----------+


mosquitto_sub -h srv -p 8883  -t multi/#  -u ca43c7cb0c069e9fc5d8d6c -P 2e262d63f51acc852797c782f63244ef  -i ca43c7cb0c069e9fc5d8d6c
mosquitto_pub -h srv -p 8883  -t multi/test  -m "comando2" -u 03030a08bb211590714949d -P 2e262d63f51acc852797c782f63244ef -i 03030a08bb211590714949d

Im not receiving my message.
According to auth plugin doc , using # and + with mysql backend is supported , but can not get it work.

regards,
Leandro.



Back to the top