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

feature(M2Mqtt): Adds auto reconnect, #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bradder555
Copy link

Auto reconnected has been added,

The workflow has been changed a little bit, but there are no breaking
interface changes, thus the new version should work with existing code
without any requirement for code changes.

Some new callbacks have been added for various events (i.e. reconnected)

The new interface is you have the client, you can add and remove topics
from the client these are stored in a list on the client

When the client connects or reconnects, subscribeAll is called, this
subscribes to all of the topics on the client.

subscribe and unsubscribe work exactly as they did before but now they
keep the topics list up to date

the classes have been changed to a program, maybe this was a bad idea,
but i found the program assisted the development process, the nice thing
is, you can still use the program as a library so no harm there.

The default-sane configuration is chosen (i.e. autoreconnect by default)
etc

Made some minor interface changes to make the app a little nicer in places

Auto reconnected has been added,

The workflow has been changed a little bit, but there are no breaking
interface changes, thus the new version should work with existing code
without any requirement for code changes.

Some new callbacks have been added for various events (i.e. reconnected)

The new interface is you have the client, you can add and remove topics
from the client these are stored in a list on the client

When the client connects or reconnects, subscribeAll is called, this
subscribes to all of the topics on the client.

subscribe and unsubscribe work exactly as they did before but now they
keep the topics list up to date

the classes have been changed to a program, maybe this was a bad idea,
but i found the program assisted the development process, the nice thing
is, you can still use the program as a library so no harm there.

The default-sane configuration is chosen (i.e. autoreconnect by default)
etc
@PPaques
Copy link

PPaques commented Jan 14, 2019

We use this PR in production. Hope it will be merged upstream one day.

@bradder555
Copy link
Author

Cool, I'm glad you find it useful, I've noticed there's a fair few downloads on NuGet.

We've since moved onto m2mqtt :).

I'd like to write a minimal implementation from scratch.

@liaoliaoda
Copy link

liaoliaoda commented Jul 6, 2020

hi, is there any sample abot auto reconnect function?

@qubbei
Copy link

qubbei commented Sep 16, 2022

How to use official packages for automatic reconnection

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.

4 participants