{"id":20381570,"url":"https://github.com/snowdrop/messaging-work-queue-example","last_synced_at":"2025-03-04T22:31:24.944Z","repository":{"id":44575203,"uuid":"140715272","full_name":"snowdrop/messaging-work-queue-example","owner":"snowdrop","description":"Example application demonstrating how to dispatch tasks to a scalable set of worker processes using a message queue","archived":false,"fork":false,"pushed_at":"2022-10-20T06:05:37.000Z","size":947,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"sb-2.7.x","last_synced_at":"2025-01-15T07:38:18.492Z","etag":null,"topics":["amqp","booster","example","kubernetes","messaging","openshift","rhoar","spring-boot"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowdrop.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-12T13:15:18.000Z","updated_at":"2022-02-11T04:26:30.000Z","dependencies_parsed_at":"2023-01-20T05:47:53.778Z","dependency_job_id":null,"html_url":"https://github.com/snowdrop/messaging-work-queue-example","commit_stats":null,"previous_names":[],"tags_count":200,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fmessaging-work-queue-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fmessaging-work-queue-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fmessaging-work-queue-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fmessaging-work-queue-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowdrop","download_url":"https://codeload.github.com/snowdrop/messaging-work-queue-example/tar.gz/refs/heads/sb-2.7.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241933523,"owners_count":20044728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amqp","booster","example","kubernetes","messaging","openshift","rhoar","spring-boot"],"created_at":"2024-11-15T02:14:20.433Z","updated_at":"2025-03-04T22:31:24.927Z","avatar_url":"https://github.com/snowdrop.png","language":"Java","readme":"= Messaging Work Queue Mission for Spring Boot\n:toc: left\n\n== Purpose\n\nThis mission example demonstrates how to dispatch tasks to a scalable\nset of worker processes using a message queue. It uses the AMQP 1.0\nmessage protocol to send and receive messages.\n\n== Prerequisites\n\n- JDK 11+ installed with JAVA_HOME configured appropriately\n- The user has access to an OpenShift instance and is logged in.\n- The user has selected a project in which the frontend and backend\n  processes will be deployed.\n\n== Modules\n\nThe `frontend` module serves the web interface and communicates with\nworkers in the backend.\n\nThe `worker` module implements the worker service in the backend.\n\n== Deployment\n\n=== With Dekorate\n\nRun the following commands to configure and deploy the applications.\n\n[source,shell script]\n----\noc apply -f .openshiftio/amq.yaml\n\noc new-app --template=amq-broker-72-basic \\\n  -p APPLICATION_NAME=work-queue-broker \\\n  -p IMAGE_STREAM_NAMESPACE=$(oc project -q) \\\n  -p AMQ_NAME=work-queue-broker \\\n  -p AMQ_PROTOCOL=amqp \\\n  -p AMQ_USER=work-queue \\\n  -p AMQ_PASSWORD=work-queue\n----\n\nDeploy frontend:\n\n[source,shell script]\n----\n./mvnw clean verify -pl frontend -Popenshift -Ddekorate.deploy=true\n----\n\nDeploy worker:\n\n[source,shell script]\n----\n./mvnw clean verify -pl worker -Popenshift -Ddekorate.deploy=true\n----\n\n== Deploying application on OpenShift using Helm\n\nFirst, make sure you have installed the Helm command line and connected/logged to a kubernetes cluster.\n\nThen, you need to install the example by doing:\n\n[source,shell script]\n----\nhelm install messaging ./helm --set frontend.route.expose=true --set frontend.s2i.source.repo=https://github.com/snowdrop/messaging-work-queue-example --set frontend.s2i.source.ref=\u003cbranch-to-use\u003e --set worker.route.expose=true --set worker.s2i.source.repo=https://github.com/snowdrop/messaging-work-queue-example --set worker.s2i.source.ref=\u003cbranch-to-use\u003e\n----\n\n**note**: Replace `\u003cbranch-to-use\u003e` with one branch from `https://github.com/snowdrop/messaging-work-queue-example/branches/all`.\n\nAnd to uninstall the chart, execute:\n\n[source,shell script]\n----\nhelm uninstall messaging\n----\n\n== Deploying application on Kubernetes using Helm\n\nRequirements:\n- Have installed [the Helm command line](https://helm.sh/docs/intro/install/)\n- Have connected/logged to a kubernetes cluster\n\nYou need to install the example by doing:\n\n[source,shell script]\n----\nhelm install messaging ./helm --set worker.ingress.host=\u003cyour k8s domain\u003e --set frontend.ingress.host=\u003cyour k8s domain\u003e\n----\n\n**note**: Replace `\u003cbranch-to-use\u003e` with one branch from `https://github.com/snowdrop/messaging-work-queue-example/branches/all`.\n\nAnd to uninstall the chart, execute:\n\n[source,shell script]\n----\nhelm uninstall messaging\n----\n\n## Running integration tests using Dekorate\n\nNote: integration tests are executed on a current namespace, so make sure to not run them in a production environment.\n\nTo execute the tests run the following command:\n[source,shell script]\n----\n./run_tests_with_dekorate_in_ocp.sh\n----\n\n== Running integration tests using S2i\n\n[source,shell script]\n----\n./run_tests_with_s2i.sh\n----\n\nThis script can take 2 parameters referring to the repository and the branch to use to source the images from.\n\n[source,shell script]\n----\n./run_tests_with_s2i.sh \"https://github.com/snowdrop/messaging-work-queue-example\" branch-to-test\n----\n\n== Running Tests on OpenShift using Helm\n\n[source,shell script]\n----\n./run_tests_with_helm_in_ocp.sh\n----\n\nThis script can take 2 parameters referring to the repository and the branch to use to source the images from.\n\n[source,shell script]\n----\n./run_tests_with_helm_in_ocp.sh \"https://github.com/snowdrop/messaging-work-queue-example\" branch-to-test\n----\n\n== Running Tests on Kubernetes using Helm\n\nFirst, you need to create the k8s namespace:\n\n[source,shell script]\n----\nkubectl create namespace \u003cthe k8s namespace\u003e\n----\n\nThen, run the tests by specifying the container registry and the kubernetes namespace:\n[source,shell script]\n----\n./run_tests_with_helm_in_k8s.sh \u003cyour container registry: for example \"quay.io/user\"\u003e \u003cthe k8s namespace\u003e\n----\n\nFor example:\n\n[source,shell script]\n----\n./run_tests_with_helm_in_k8s.sh \"quay.io/user\" \"myNamespace\"\n----\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdrop%2Fmessaging-work-queue-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowdrop%2Fmessaging-work-queue-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdrop%2Fmessaging-work-queue-example/lists"}