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

Remove PubSub MQTT startup delay #1547

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

einarmo
Copy link
Contributor

@einarmo einarmo commented Oct 11, 2021

This causes considerable slowdown when connecting to multiple MQTT destinations or when waiting for the pubsub application to start, and is unnecessary.

Instead, the Disconnect handler fires by default if Connect fails, which has the same effect, but does not block on pubsub application startup.

This slightly changes behavior in that there is no guarantee that a connection has been established to the broker when Start returns, but I think this is better, as this effectively handles redundant brokers, which the previous solution does not.

Either way, the delay should only be called if connect fails.

@CLAassistant
Copy link

CLAassistant commented Oct 11, 2021

CLA assistant check
All committers have signed the CLA.

This can cause considerable slowdown when connecting to multiple MQTT
destinations or when waiting for pubsub application to start, and is
unecessary.

Instead, the DisconnectHandler fires on connect fail as well, so this
implementation works.
Copy link
Contributor

@mrsuciu mrsuciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the change makes sense.

@mrsuciu mrsuciu merged commit 980b9f1 into OPCFoundation:master Nov 1, 2021
opcfoundation-org pushed a commit that referenced this pull request Nov 2, 2021
This can cause considerable slowdown when connecting to multiple MQTT
destinations or when waiting for pubsub application to start, and is
unecessary.

Instead, the DisconnectHandler fires on connect fail as well, so this
implementation works.
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.

None yet

3 participants