AtherEnergy / rumqtt

Pure rust mqtt cilent
The Unlicense
202 stars 71 forks source link

Having problems using topics with dollar sign #182

Closed arnstein closed 4 years ago

arnstein commented 4 years ago

I am currently trying to make an AWS IoT core client SDK in Rust. I am able to subscribe and publish to standard topics just by using rumqtt, but when trying to implement the device shadow functionality I am having problems both in subscribing and publishing.

Without going into the details of device shadow, what I have to do is subscribe and publish to topics that are constructed like "$aws/things/thingname/shadow/update/accepted".

Trying to publish to my own custom topics like "test/$topic" also fails. When I use the MQTT client on the AWS page it works.

Am I missing something obvious here, or could there be a problem when passing/converting the topic names in rumqtt?

Edit: This seems to be a typical PEBKAC problem relating to AWS policies. I did allow all of the relevant shadow topics, but it still did not work. Then I made a new policy that allowed EVERYTHING (shrug), and that works. I will continue developing with this policy, then do the policy debugging later.