8000 MF-1053 - Add disconnect event to MQTT adapter by dborovcanin · Pull Request #1056 · absmach/supermq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MF-1053 - Add disconnect event to MQTT adapter #1056

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

Merged
merged 3 commits into from
Mar 3, 2020

Conversation

dborovcanin
Copy link
Collaborator

Signed-off-by: Dušan Borovčanin dusan.borovcanin@mainflux.com

What does this do?

This pull request updates MQTT adapter to use the most recent version of mProxy (0.1.1). It also introduces minor optimizations and code refactoring.

Which issue(s) does this PR fix/relate to?

This pull request resolves #1053.

List any changes that modify/break current functionality

A package rename might cause some issues in case you're importing the MQTT adapter package.

Have you included tests for your changes?

No.

Did you document any new/modified functionality?

No.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
@dborovcanin dborovcanin requested a review from a team as a code owner March 3, 2020 17:25
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
blokovi
blokovi previously approved these changes Mar 3, 2020
@codecov-io
Copy link
codecov-io commented Mar 3, 2020

Codecov Report

Merging #1056 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1056      +/-   ##
==========================================
+ Coverage   79.03%   79.06%   +0.03%     
==========================================
  Files          95       95              
  Lines        6610     6610              
==========================================
+ Hits         5224     5226       +2     
+ Misses       1076     1075       -1     
+ Partials      310      309       -1
Impacted Files Coverage Δ
writers/cassandra/init.go 85.71% <0%> (+14.28%) ⬆️

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 cc90f56...1f34d6d. Read the comment docs.

mqtt/adapter.go Outdated
e.logger.Info(fmt.Sprintf("Error in mqtt publish %s", err))
return
for _, mp := range e.pubs {
if err := mp.Publish(context.TODO(), "", msg); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have async publish with a separate routine for each publisher?

mqtt/adapter.go Outdated
return
for _, mp := range e.pubs {
go func() {
if err := mp.Publish(context.TODO(), "", msg); err != nil {

Choose a reason for hiding this comment

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

loopclosure: loop variable mp captured by func literal (from govet)

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
@nmarcetic nmarcetic merged commit 1c6f124 into absmach:master Mar 3, 2020
manuio pushed a commit that referenced this pull request Oct 12, 2020
* Add disconnect event to mProxy

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Rename publishers to pubs

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use acync publishers

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
@dborovcanin dborovcanin deleted the MF-1054 branch February 17, 2021 09:08
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.

Add disconnect event to MQTT adapter
5 participants
0