generated from rog-golang-buddies/golang-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Queue setup #17
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
Queue setup #17
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add docker-compose with rabbit management plugin.
Add consumer/publisher interfaces.
# Conflicts: # .github/workflows/golangci-lint.yml
for more information, see https://pre-commit.ci
|
||
//NewPublisher creates a publisher and connects to the rabbit under the hood. | ||
//This method appears to be not testable cause it combines 2 responsibilities: create an instance and connect to a queue. | ||
//I think we may rely on NewPublisher has been already tested in the library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
lucianolacurcia
approved these changes
Aug 1, 2022
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
released
review required
The pull request is ready and needs to be reviewed or just requesting view from the outside.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change
closes #11
Semantic Versioning
feat
changeType of change
Please delete options that are not relevant.
How Has This Been Tested?
Added unit tests and possibility to deploy service with the docker-compose
Automated
Just go test ./...
Manual
To deploy changes with the docker-compose you can use the next command from the project root:
docker-compose -f ./docker/docker-compose-dev.yml up -d --build
After docker has been started you can go to the http://localhost:15672 , auth with guest/guest, and move to the Queues tab.
Queues for the listeners will be created automatically (here it is 'data-scraping-asd')
You need to create queues for the publishers if you want to observe posted results (you need to add 'storage-update-asd' and 'gateway-scrape_notifications').
After just clicking 'data-scraping-asd' from the list, open Publish Message and put the request body here.
It needs to be something like that:
{"FileUrl":"test url","IsNotifyUser":true}
(true if you want notification to the 'gateway-scrape_notifications' queue)You can see consumed messages in the dss container logs ('docker logs dss' or from the ide/docker-desktop)
And get them in the queue management - just click the required queue from the Queues page and fine GetMessage below the charts.
Checklist: