Skip to content
This repository was archived by the owner on Jul 22, 2022. It is now read-only.

When can we have AMQP_Protocol or MQTT_Protocol support? #26

Closed
yaweiw opened this issue Aug 26, 2016 · 15 comments
Closed

When can we have AMQP_Protocol or MQTT_Protocol support? #26

yaweiw opened this issue Aug 26, 2016 · 15 comments
Labels

Comments

@yaweiw
Copy link
Contributor

yaweiw commented Aug 26, 2016

as titled.

@olivierbloch
Copy link

Hi @yaweiw
This is a perfectly reasonable ask (at least for MQTT as I suspect AMQP might be a bit too much in terms of memory usage to be brought up). We will look into this soon and will keep you posted here.

@henrik-d
Copy link

Can you please confirm or refute, that currently only sending data to the IoTHub is supported and not receiving messages via MQTT? I'm a bit confused...

@olivierbloch
Copy link

At this point you can only use HTTP to send AND receive messages using the Arduino lib.
We are planning to bring MQTT support soon and certainly AMQP later.

@henrik-d
Copy link

henrik-d commented Oct 30, 2016

Hey, thanks for the answer. How can I receive notifications with HTTP? Does your lib use long polling?

Plans for supporting MQTT sound good!

@olivierbloch
Copy link

The library doesn't implement long poling, you have to do it in your loop. MQTT will definitively solve this.

@yaweiw
Copy link
Contributor Author

yaweiw commented Nov 7, 2016

For AMQP & MQTT, I use below code snippet to poll for iot client status
while ((IoTHubClient_LL_GetSendStatus(iotHubClientHandle, &status) == IOTHUB_CLIENT_OK) && (status == IOTHUB_CLIENT_SEND_STATUS_BUSY))
{
IoTHubClient_LL_DoWork(iotHubClientHandle);
ThreadAPI_Sleep(100);
}

@olivierbloch
Copy link

Hi @yaweiw
I wouldn't recommend using this pattern. When using the lower layer of the C SDK (you can read more about lower layer vs. convenience layer of the C SDK here), the DoWork is about triggering all the work the client SDK has to do: send a message, receive a message,...). If you condition the call to DoWork on the GetSendStatus, then you will never receive a message if you are not sending one...

@yaweiw
Copy link
Contributor Author

yaweiw commented Nov 11, 2016

@olivierbloch in our code, sending is happening constantly.. any possibility to just receive while not send. I guess it's no according to behavior of IoTHubClient_LL_DoWork?

@olivierbloch
Copy link

Actually you can receive without ever sending. You need to register the callback for receiving messages, then regularly call DoWork. If a message is sent from the Cloud to the device then the next time the DoWork is called, the device client will get the message and will invoke the callback you registered. Our samples show this pattern

@henrik-d
Copy link

@olivierbloch Could you roughly estimate when you will support MQTT with this library? In 1 month, 6 month or 1 year?

@mingdee
Copy link

mingdee commented Nov 11, 2016

Please I would like to have that answer as well.

@magohl
Copy link

magohl commented Nov 12, 2016

Would also very much like to know any kind of rough timeline indication on this. Thanks for the great work!

@olivierbloch
Copy link

We are actively working on bringing MQTT support and expect this to be shipped in the next month or so.

@spincraft
Copy link

MQTT would make a great Holiday gift!
Thanks for your efforts.
Best regards

@mamokarz
Copy link
Contributor

mamokarz commented Dec 8, 2016

Hi,
Microsoft has just added MQTT for Arduino... Happy holydays!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants