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

PUBSUB connect, disconnect with mqttStatus callback #2372

Closed
praveshkhatana opened this issue Dec 18, 2018 · 4 comments
Closed

PUBSUB connect, disconnect with mqttStatus callback #2372

praveshkhatana opened this issue Dec 18, 2018 · 4 comments
Assignees
Labels
feature-request Request a new feature PubSub Related to PubSub category

Comments

@praveshkhatana
Copy link

Is your feature request related to a problem? Please describe.
We are using IOT for presence system and there is no such method to Connect & Disconnect like we have in other IOS/Android IOT SDK. Also no way to check the mqttStatus. It requires to build the logic based on it, for example, we can update user online/offline status in Database based on returned mqttStatus 1/3/5.

Describe the solution you'd like
Provide Connect (with MqttStatus Callback) & Disconnect methods.

Describe alternatives you've considered
Any other way to provide MqttStatus Callback(important part, need this to update database) with current Subscribe method. But I think, It won't work in this way. It should be the same like we have in IOS/Android SDK.

@elorzafe
Copy link
Contributor

Hi @praveshkhatana thanks for your feedback, I will tag this as feature-request

@elorzafe elorzafe added feature-request Request a new feature PubSub Related to PubSub category labels Dec 19, 2018
@stale
Copy link

stale bot commented Jun 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Stefano1990
Copy link

Since this has been closed what is the recommended approach for implementing a presence system in aws amplify?

@stocaaro
Copy link
Member

We've just released connection state monitoring for the IoT integration, which is now documented here. For the use-case of presence monitoring, I wouldn't recommend the PubSub IoT integration as this requires the user to be logged in and individually authorized against the IoT policy from the PubSub getting started guide.

If I where building presence monitoring today, I would use the API category to add a non-persisted subscribe-able mutation which other users could then subscribe to which other users can listen for. If each user is signaling presence once per minute, then all other users can track the number of events that have happened in the past minute.

Adjust as needed to account for auth/use uniqueness or persistence to best capture initial state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature PubSub Related to PubSub category
Projects
None yet
Development

No branches or pull requests

5 participants