Search code examples
androidibm-cloudmqttiot

IBMIOTF Can a device subscribe to an event?


I have looked around and read through the documentation, but I cannot find any mention of a device subscribing to an event from a different device?

My set up is that I have 2 devices, and 1 application. I would like one device to be able to receive events from the other, without having to use the application as a relay (in that the application receives the event, and re-emits it as a command).

The device to receive the event is Android, and although I believe I can subscribe to the correct topic I will not receive any data.


Solution

  • A device can only subscribe to commands - it cannot subscribe to the event topics of other devices.

    Only applications have the access needed to subscribe to events - so you would have to use the message relay approach.