-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EdgeHub: Fix Mqtt address parsing #76
Conversation
…om/Azure/iotedge into varunpuranik/fixMqttAddressParsing
@@ -97,9 +97,13 @@ public bool TryParseProtocolMessagePropsFromAddress(IProtocolGatewayMessage mess | |||
|
|||
if (matches.Count > 1) | |||
{ | |||
this.logger.LogWarning($"Topic name {message.Address} matches more than one route. Picking first matching route."); | |||
this.logger.LogWarning($"Topic name {message.Address} matches more than one topic. Picking first matching topic."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
topic. Picking first matching topic. [](start = 92, length = 36)
Is it really topic or route makes more sense? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think both message is a little bit confusing looking it at first. I would suggest changing to: "Topic Name {bla} matches more than one topic in inboundTable (Or something similar)... Same for the message below....
In reply to: 205842887 [](ancestors = 205842887)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the topic.. But you may be right, the sentence does seem a bit odd. Let me fix it. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…om/Azure/iotedge into varunpuranik/fixMqttAddressParsing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since around August 22, data is no longer sent upstream with the following error. 2018-08-23 03:01:00.912 +00:00 [WRN] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MessageAddressConverter] - Message address devices/EdgeDeviceID001/modules/dummyModule/messages/events/ matches more than one It can send normally, if removed slash at the end of topics as follows. devices/EdgeDeviceID001/modules/dummyModule/messages/events |
We understand. |
IoTHub ignores slashes at the end of MQTT telemetry topics, but EdgeHub doesn't. So updating the code to being EdgeHub to parity.
Also adding a Warning if the topic doesn't match any input. I contemplated throwing in this case, but decided against it since the code is fairly generic and I want to make sure this doesn't break any existing scenarios.