Skip to content

MQTT acknowledgement for QoS 1 #10

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

Closed
salvq opened this issue Nov 22, 2019 · 2 comments
Closed

MQTT acknowledgement for QoS 1 #10

salvq opened this issue Nov 22, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@salvq
Copy link

salvq commented Nov 22, 2019

Hello,

I have been using https://github.com/VSChina/ESP32_AzureIoT_Arduino for connection for some time and it has one very important feature. Recently I switched over to MKR GSM and started using examples https://github.com/arduino/ArduinoCloudProviderExamples and would like to understand if there are routines for following features part of libraries that are used.

  1. Callback whether the message has been delivered / received to IOT HUB (MS AZURE) ? The main reason is to keep tracking and consistency whether all the messages from arduino has been received to MS azure. If there are, can you point me where it is so i will integrate to my routines.
  2. Device twin callback i.e. firmware update via MS AZURE ? Also, if so can you point me where to find this routines ?

Attaching example from callback from ESP32 routine (acknowledge)

static void SendConfirmationCallback(IOTHUB_CLIENT_CONFIRMATION_RESULT result)
{
  if (result == IOTHUB_CLIENT_CONFIRMATION_OK)
  {
    Serial.println("Send Confirmation Callback finished.");
  }
}

This was an output to serial monitor:

10:18:23.212 -> Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.

10:18:23.521 -> Info: >>>Confirmation[2] received for message tracking id = 2 with result = IOTHUB_CLIENT_CONFIRMATION_OK

10:18:23.521 -> Send Confirmation Callback finished.

Attaching example from callback from ESP32 routine (devicetwin)

static void DeviceTwinCallback(DEVICE_TWIN_UPDATE_STATE updateState, const unsigned char *payLoad, int size)
{
  char *temp = (char *)malloc(size + 1);
  if (temp == NULL)
  {
    return;
  }
  memcpy(temp, payLoad, size);
  temp[size] = '\0';
  // Display Twin message.
  Serial.println(temp);
  free(temp);
}

Thank you

@salvq salvq changed the title MS Azure Acknowledgement MQTT acknowledgement for QoS 1 Dec 1, 2019
@salvq
Copy link
Author

salvq commented Dec 1, 2019

Hello, I did find out to use QoS set to level 1 or even 2 to ensure delivery.

Is there any notification about confirmation that message has been delivered or re-transmitted and so on ? I would like to start logging this type of data for further analysis.

Thanks

@salvq
Copy link
Author

salvq commented Dec 11, 2019

Closing, just need to believe the spec that msg is there

@salvq salvq closed this as completed Dec 11, 2019
@per1234 per1234 self-assigned this Oct 30, 2023
@per1234 per1234 added the enhancement New feature or request label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants