Closed sjoerd222888 closed 3 years ago
We are faced with the MQTT not working in case you have defined a proxy. I currently think what I wrote here is the reason for this. Do you agree?
This SDK does not support using proxies over MQTT. It only supports proxies over MQTT_WS, HTTPS and AMQPS_WS, so this doesn't seems like a bug to me. If anything, the SDK should probably be throwing an UnsupportedOperationException here to prevent users from trying this.
Is there a particular use case that you are going for here that I'm misunderstanding though? And if so, can you provide some repro code that demonstrates this issue?
Thanks for the quick response. What you say absolutely make sense. The code I was faced does not make sense in the first place.
With https://github.com/Azure/azure-iot-sdk-csharp/pull/1326 the issue https://github.com/Azure/azure-iot-sdk-csharp/issues/1063 got resolved.
However that meant in the case having a proxy defined in the MqttTransportHandler then
_serverAddresses
is set to an empty array inOpenInternalAsyn
But now when a channel is openend with
So we pass the
_serverAddresses
, which is an empty array in the proxy case. InCreateChannelFactory
we iterate over the_serverAddresses
But as this array is empty it it won't even iterate so no connections is opened at all.
We are faced with the MQTT not working in case you have defined a proxy. I currently think what I wrote here is the reason for this. Do you agree?