{"id":18778249,"url":"https://github.com/ajsalemo/dapr-pub-sub-examples","last_synced_at":"2025-12-17T09:30:16.234Z","repository":{"id":184073891,"uuid":"670372287","full_name":"Ajsalemo/dapr-pub-sub-examples","owner":"Ajsalemo","description":"Various examples of using Dapr with the pubsub building block across runtimes.","archived":false,"fork":false,"pushed_at":"2024-11-05T15:27:38.000Z","size":3472,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T10:16:06.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ajsalemo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-24T23:03:03.000Z","updated_at":"2024-11-05T15:27:42.000Z","dependencies_parsed_at":"2024-11-01T21:23:34.631Z","dependency_job_id":"c0cf7606-5556-4299-8c50-09e1cb543f96","html_url":"https://github.com/Ajsalemo/dapr-pub-sub-examples","commit_stats":null,"previous_names":["ajsalemo/dapr-pub-sub-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2Fdapr-pub-sub-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2Fdapr-pub-sub-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2Fdapr-pub-sub-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajsalemo%2Fdapr-pub-sub-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ajsalemo","download_url":"https://codeload.github.com/Ajsalemo/dapr-pub-sub-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690075,"owners_count":19681035,"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":[],"created_at":"2024-11-07T20:15:44.348Z","updated_at":"2025-12-17T09:30:14.152Z","avatar_url":"https://github.com/Ajsalemo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dapr-pub-sub-examples\nVarious examples of using Dapr with the pubsub building block across runtimes.\n\n**NOTE**: These example(s) and the below instructions use Event Hub - however, other pubsub providers can be input as desired.\n\n## Running locally\n1. Install some type of Kubernetes cluster. An easy method is to just enable [Kubernetes in Docker Desktop](https://docs.docker.com/desktop/kubernetes/#:~:text=To%20turn%20on%20Kubernetes%20in%20Docker%20Desktop%3A%201,and%20installs%20the%20%2Fusr%2Flocal%2Fbin%2Fkubectl%20command%20on%20your%20machine.)\n2. Each language folder has a `local-k8s` sub folder. This contains a `pubsub.yaml`, `deployment.yaml` and `service.yaml` file.\n   - Prior to deployment, update the `pubsub.yaml` with the required values needed\n3. Build the image with the `Dockerfile` in the language folder being used. If the image name is not the same name in `deployment.yaml`, then update `deployment.yaml`\n4. Deploy the project with `kubectl apply -f local-k8s/`\n\n## Using Container Apps\n1. Create a Container App and Container App environment\n2. Push the image built from the language `Dockerfile` to an Azure Container Registry\n3. Create a `pubsub` dapr component, with the following:\n  - ![image](https://github.com/Ajsalemo/dapr-pub-sub-examples/assets/31021304/32d2f13d-f62e-42d6-ba1c-ae5e724335de)\n  - Add in the same `metaData` thats in the `local-k8s` folders in the examples\n  - `connectionString`: EventHub connection string\n  - `storageAccountName`: Storage account name\n  - `storageAccountKey`: Storage account key\n  - `storageContainerName`: Storage ontainer name\n  - `consumerID`: Name of the consumer ID, if not defined, it uses the `appId`\n  - Add the component to the application by specifying it in `scopes`\n4. Enable dapr on the Container App\n5. Ensure ingress is set to the appropriate port for the language example being used\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajsalemo%2Fdapr-pub-sub-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajsalemo%2Fdapr-pub-sub-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajsalemo%2Fdapr-pub-sub-examples/lists"}