I am using the Cloud IoT Core module to send messages from a device to the cloud using MQTT. The device uses a gateway to send these messages and the gateway is configured with the Association only method. For this, the MQTT Client is configured with the gatewayID so the gateway is the only one authenticated.
The problem is that, if the gateway publishes telemetry data using the device's MQTT topic like this "/devices/{device-id}/events", the telemetry data is not received in the cloud (I have checked this with a Cloud pub/sub subscription). It doesn't show any error on the gateway, and even the Message Delivered callback is called.
However, if the gateway publishes data to its topic, which is "/devices/{gateway-id}/events", the telemetry data is received correctly in the cloud.
I have checked Google's GitHub documentation (I am using JAVA for this with mqtt paho) and the topic it uses to publish telemetry data on behalf the device (also with the association only method) is the "/devices/{device-id}/events".
Is this because the Authorization only method only allows publishing the telemetry data through the gateway's MQTT topic??