Skip to content
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

[fix](azure-iot-device-mqtt): remove double nesting on sendEvent TransportObj #627

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

YoDaMa
Copy link
Contributor

@YoDaMa YoDaMa commented Sep 14, 2019

This is in reference to #626

The wrapping of the response was 1) redundant and 2) out of line with how other MQTT calls are made.

With this change an MQTT PUB and ACK look like this:

  azure-iot-mqtt-base:MqttBase CONNACK: {"cmd":"connack","retain":false,"qos":0,"dup":false,"length":2,"topic":null,"payload":null,"sessionPresent":false,"returnCode":0} +1ms
...
  azure-iot-device-mqtt:Mqtt PUBACK: {"cmd":"publish","topic":"devices/beta/messages/events/IMPACT_EMERGENCY=false","payload":"{\"size\":26.15078342292594,\"timeTillImpact\":22.72007917052823}","qos":1,"retain":false,"messageId":10181,"dup":false} +2s

Before (without this change):

  azure-iot-mqtt-base:MqttBase CONNACK: {"cmd":"connack","retain":false,"qos":0,"dup":false,"length":2,"topic":null,"payload":null,"sessionPresent":false,"returnCode":0} +1ms
...
  azure-iot-device-mqtt:Mqtt PUBACK: {"transportObj":{"cmd":"publish","topic":"devices/beta/messages/events/IMPACT_EMERGENCY=false","payload":"{\"size\":49.08919394567126,\"timeTillImpact\":57.049220217156815}","qos":1,"retain":false,"messageId":48866,"dup":false}} +6s

This resolves the unnecessary double nesting that occurred on message responses, which was a bug.

@YoDaMa YoDaMa changed the title unnest sendEvent response [fix](azure-iot-device-mqtt): remove double nesting on sendEvent TransportObj Sep 14, 2019
@YoDaMa
Copy link
Contributor Author

YoDaMa commented Sep 14, 2019

test needed.

@YoDaMa YoDaMa force-pushed the mqttMessageEnqueuedBug branch 4 times, most recently from f68e768 to d93ab3c Compare September 19, 2019 21:12
Copy link
Contributor

@anthonyvercolano anthonyvercolano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@anthonyvercolano
Copy link
Contributor

/azp run horton-node-gate

@YoDaMa YoDaMa merged commit 140f49d into master Sep 19, 2019
@YoDaMa YoDaMa deleted the mqttMessageEnqueuedBug branch February 21, 2020 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants