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: Add call to Message Bus Connect() #2467

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

lenny-goodell
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

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?

Core data fails to publish to MQTT MessageBus due to not being connected.

Issue Number: #2466

What is the new behavior?

Core data successfully publishes to MQTT MessageBus.

Does this PR introduce a breaking change?

  • Yes
  • No

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

Other information

@codecov-io
Copy link

Codecov Report

Merging #2467 into master will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2467      +/-   ##
==========================================
- Coverage   38.25%   38.21%   -0.04%     
==========================================
  Files         153      153              
  Lines       12583    12594      +11     
==========================================
  Hits         4813     4813              
- Misses       7513     7524      +11     
  Partials      257      257              
Impacted Files Coverage Δ
internal/core/data/init.go 0.00% <0.00%> (ø)

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 5d710f1...ae5bb09. Read the comment docs.

Copy link
Contributor

@AnthonyMBonafide AnthonyMBonafide left a comment

Choose a reason for hiding this comment

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

Could we add logic for calling the Disconnect method on the client as well. During testing these changes I noticed that the MQTT server is reporting that the client did not properly disconnect.

@lenny-goodell
Copy link
Member Author

Could we add logic for calling the Disconnect method on the client as well. During testing these changes I noticed that the MQTT server is reporting that the client did not properly disconnect.

Great catch. I will add this. THX!

Core data was missing call to connect to message bus and needed latest go-mod-messging for MQTT Message Bus to work.

closes edgexfoundry#2466

Signed-off-by: lenny <leonard.goodell@intel.com>
@sonarcloud
Copy link

sonarcloud bot commented Apr 7, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lenny-goodell
Copy link
Member Author

@AnthonyMBonafide , disconnect code has been added.

Copy link
Contributor

@AnthonyMBonafide AnthonyMBonafide left a comment

Choose a reason for hiding this comment

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

LGTM! I verified these changes manually with a locally running MQTT Mosquitto server.

@AnthonyMBonafide AnthonyMBonafide merged commit 2cabbc2 into edgexfoundry:master Apr 8, 2020
@lenny-goodell lenny-goodell deleted the mqttfix branch January 14, 2021 16:49
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.

3 participants