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

fix(triggers): MQTT subscribe via onConnect handler so re-subscribe on auto-reconnect #537

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

lenny-goodell
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Topic not re-subscribed to when auto reconnect occurs

Issue Number: #531

What is the new behavior?

Topic is subscribed to after any connect, initial or auto

Does this PR introduce a breaking change?

  • Yes
  • No

Are there any new imports or modules? If so, what are they used for and why?

no

Are there any specific instructions or things that should be known prior to reviewing?

Other information

@lenny-goodell lenny-goodell changed the title fix(triggers): MQTT subscribe via onConnect handler so re-subscribe on reconnects fix(triggers): MQTT subscribe via onConnect handler so re-subscribe on auto-reconnect Oct 13, 2020
@codecov-io
Copy link

codecov-io commented Oct 13, 2020

Codecov Report

Merging #537 into master will decrease coverage by 2.84%.
The diff coverage is 62.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
- Coverage   64.65%   61.81%   -2.85%     
==========================================
  Files          35       42       +7     
  Lines        2105     2163      +58     
==========================================
- Hits         1361     1337      -24     
- Misses        663      739      +76     
- Partials       81       87       +6     
Impacted Files Coverage Δ
appcontext/context.go 80.00% <ø> (-0.96%) ⬇️
internal/bootstrap/handlers/secrets.go 0.00% <0.00%> (ø)
internal/bootstrap/handlers/storeclient.go 0.00% <ø> (ø)
internal/runtime/runtime.go 71.60% <ø> (-1.34%) ⬇️
internal/security/credentials.go 51.25% <ø> (-3.70%) ⬇️
internal/security/mockprovider.go 0.00% <0.00%> (ø)
pkg/transforms/jsonlogic.go 89.47% <ø> (-1.01%) ⬇️
pkg/transforms/mqtt.go 0.00% <0.00%> (ø)
pkg/transforms/mqttsecret.go 23.43% <0.00%> (-31.57%) ⬇️
pkg/util/helpers.go 95.65% <0.00%> (-4.35%) ⬇️
... and 58 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fa6067...cb3a60d. Read the comment docs.

Copy link
Contributor

@jim-wang-intel jim-wang-intel left a comment

Choose a reason for hiding this comment

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

minor error handling case needed I guess

adam-intel
adam-intel previously approved these changes Oct 14, 2020
@lenny-goodell lenny-goodell merged commit c8e7ff0 into edgexfoundry:master Oct 14, 2020
@lenny-goodell lenny-goodell deleted the onConnect branch October 14, 2020 23:28
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.

Cannot subscribe topics when the client auto reconnect to mqtt broker by using external-mqtt trigger
4 participants