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(command): command query via internal messaging #4182

Merged
merged 1 commit into from
Oct 5, 2022
Merged

feat(command): command query via internal messaging #4182

merged 1 commit into from
Oct 5, 2022

Conversation

chr1shung
Copy link

fix #4176

Signed-off-by: Chris Hung [email protected]

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

  1. Run core-command from this branch with MESSAGEQUEUE_REQUIRED=true environment variable
  2. Send command query request via internal messaging, for example:
/data # redis-cli
127.0.0.1:6379> PUBLISH .commandquery.request.Random-Boolean-Device '{"CorrelationID": "14a42ea6-c394-41c3-8bcd-a29b9f5e6835", "ApiVersion": "v2", "RequestId": "e6e8a2f4-eb14-4649-9e2b-175247911369", "ContentType": "application/json"}'
(integer) 1
  1. Verify core-command received the request and send the response back correctly:
level=DEBUG ts=2022-10-05T07:26:15.601091825Z app=core-command source=internal.go:196 msg="Command query request received on internal MessageBus. Topic: /commandquery/request/Random-Boolean-Device, Correlation-id: 14a42ea6-c394-41c3-8bcd-a29b9f5e6835 "
level=DEBUG ts=2022-10-05T07:26:15.606759825Z app=core-command source=internal.go:223 msg="Command query response sent to internal MessageBus. Topic: /commandquery/response, Correlation-id: 14a42ea6-c394-41c3-8bcd-a29b9f5e6835"

New Dependency Instructions (If applicable)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication 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.

LGTM

@lenny-goodell lenny-goodell merged commit 07636ef into edgexfoundry:main Oct 5, 2022
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.

Core command subscribes to internal query requests and publishes query responses back via messaging
2 participants