Amplify-js: PubSub connection lifecycle handling

Created on 29 Oct 2018  路  7Comments  路  Source: aws-amplify/amplify-js

Hi there,
I am using Amplify PubSub with AWS IoT.
I have trouble understanding how Amplify with IoT lifecycle works.
I would like to be able to easily retrieve the connection status of the IoT provider.
To me it seems like the connection is established automatically at a certain point after the call to addPlugable(new AWSIoTProvider({...})).
Can i request the connection by myself ? Can i intercept error message from the connection attempt ?
Can i provide a callback to acknoledge the different connection status (Connecting, Connected, ConnectionLost) ?
How can i know if the connection was lost ?
Thank you,

PubSub feature-request pending-close-response-required

Most helpful comment

This would be a great improvement. At minimum, Paho already supports onConnectionLost, so it should be minimal effort. My client suffers from disconnects from time to time and knowing how to automatically handle that would be great UX improvement.

All 7 comments

This would be a great improvement. At minimum, Paho already supports onConnectionLost, so it should be minimal effort. My client suffers from disconnects from time to time and knowing how to automatically handle that would be great UX improvement.

Any update on this topic ? We really need an interface to handle connection status! Thank you!

+1 request for connection/subscription event handlers and methods to retrieve current status.

This has been open for more than 6 months now and from what i understand the fix seems fairly quick to make. When can we expect to have some news for this ?

@manueliglesias @elorzafe

Thank you

@nayan27, we are open to accept PRs for this!

In the meantime, I can mark this as a feature request and we can evaluate whether or not to prioritize it.

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

+1 Request

PRs

Would really appreciate this change

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rayhaanq picture rayhaanq  路  3Comments

DougWoodCDS picture DougWoodCDS  路  3Comments

romainquellec picture romainquellec  路  3Comments

guanzo picture guanzo  路  3Comments

shinnapatthesix picture shinnapatthesix  路  3Comments