Closed fiLLLip closed 4 years ago
Hi @fiLLLip , Sorry for the lack of response here, i see that you linked a closed issue on crt-nodjs, does that mean you've figure this out? Do you still have other questions?
Yes, I used the .on('message')
event instead after subscribing. This supplied the message topic.
When trying out the sample, and listening to MQTT on a wildcard topic, the topic set in the on_publish is set to the filter, not the actual topic that the message appeared on. How to deal with this, and get the actual topic?
E.g. '$aws/things/+/shadow/update/accepted' should give topic '$aws/things/my_test_device/shadow/update/accepted'
https://github.com/aws/aws-iot-device-sdk-js-v2/blob/4ad3f10b9ef08143b870c892d146dd7d062f3ee1/samples/node/pub_sub/index.ts#L120
Edit: Maybe this should be directed at the https://github.com/awslabs/aws-crt-nodejs project?