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

feat(sdk): Add background publisher to MessageBus #466

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

AlexCuse
Copy link
Contributor

@AlexCuse AlexCuse commented Sep 4, 2020

Creates a channel of provided capacity and attaches to the sdk instance.
This channel is then passed to the trigger so that MessageEnvelopes can
be pulled off of it and dropped on the queue. Publisher handles
formatting the passed message so there is no need to couple using types
from go-mod-messaging.

Closes: #462

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?

Issue Number: 462

What is the new behavior?

Adds a background publisher for MessageBus services

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

Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

Nice job, just a few very minor things...

internal/trigger/http/rest.go Outdated Show resolved Hide resolved
appsdk/backgroundpublisher.go Show resolved Hide resolved
appsdk/backgroundpublisher.go Show resolved Hide resolved
appsdk/sdk_test.go Show resolved Hide resolved
internal/trigger/messagebus/messaging.go Show resolved Hide resolved
@AlexCuse
Copy link
Contributor Author

AlexCuse commented Sep 4, 2020

@lenny-intel made the changes and force-pushed

lenny-goodell
lenny-goodell previously approved these changes Sep 4, 2020
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

Code looks good! Want @rsdmike to also review before merge

@rsdmike
Copy link
Member

rsdmike commented Sep 4, 2020

Looks like ya need to run gofmt on the _test.go file:

 gofmt -l .

[2020-09-04T21:42:11.257Z] internal/trigger/http/rest_test.go

[2020-09-04T21:42:11.257Z] [ "`gofmt -l .`" = "" ]

[2020-09-04T21:42:11.518Z] make: *** [Makefile:9: test] Error 1

@lenny-goodell
Copy link
Member

@AlexCuse , verify job failed due to internal/trigger/http/rest_test.go needs to be formatted via gofmt

rsdmike
rsdmike previously approved these changes Sep 4, 2020
Creates a channel of provided capacity and attaches to the sdk instance.
This channel is then passed to the trigger so that MessageEnvelopes can
be pulled off of it and dropped on the queue.  Publisher handles
formatting the passed message so there is no need to couple using types
from go-mod-messaging.

Closes: edgexfoundry#462
Signed-off-by: Alex Ullrich <[email protected]>
@AlexCuse
Copy link
Contributor Author

AlexCuse commented Sep 4, 2020

I was so happy I remembered the --signoff that time of course I forgot something else. Just pushed should be good. Have a nice weekend!

@lenny-goodell lenny-goodell self-requested a review September 4, 2020 23:36
@lenny-goodell lenny-goodell merged commit 7cb694d into edgexfoundry:master Sep 4, 2020
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.

Enhancement: Asynchronous Background Publishing to MessageBus
3 participants