Closed matthieucx closed 1 year ago
Hi @chefmtt, unfortunately I am not able to reproduce this issue on my end. I am using the latest version of the SDK and have both device and module client connected/open and have the same messaging route that you are using. For me the messages are received on the module client.
Could please provide us with a log file to help us look into it with more details. Also, does it work for you when the device client is not connected? Do you see similar behavior when using MQTT transport?
Hi @matthieucx, I am closing this issue due to inactivity, feel free to re-open this if you need any more assistance.
Context
Description of the issue
When routing messages, if the ModuleClient sending the message is alive while a DeviceClient is too, the message is set to the default endpoints (i.e it appears when using `az iot hub monitor-events --hub-name or the Azure IoT Explorer).
I do not know if this is something that is by design or not but I could not find any information or warning against using both a DeviceClient and a ModuleClient in the same application. I'm guessing that they're maybe sharing resources ? One strange thing is that in the IoTHub Explorer the given output is still present.
Code sample exhibiting the issue
Here is my worker class for sending a message:
A "Setup" class:
And my Program.cs:
Here is my class to pick up messages, which uses the same setup and program classes
And the route that I'm using:
Console log of the issue
There isn't any error or warning, only messages not being routed (and thus shown in the Azure IoT Explorer).
Thanks in advance for any help, I'll be more than happy to help track down this issue