{"id":16989146,"url":"https://github.com/kosperera/skol-resthooks-try-fabric","last_synced_at":"2026-04-17T17:32:06.726Z","repository":{"id":194833050,"uuid":"664360689","full_name":"kosperera/skol-resthooks-try-fabric","owner":"kosperera","description":"Minimal RESThooks backend services running on Service Fabric","archived":false,"fork":false,"pushed_at":"2023-09-04T05:19:33.000Z","size":312,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T02:45:42.439Z","etag":null,"topics":["architecture-center","csharp","dotnet","resthooks","sample-project","service-fabric","webhooks"],"latest_commit_sha":null,"homepage":"https://dev.to/kosperera/migrating-service-fabric-apps-to-net-6-2bee","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kosperera.png","metadata":{"files":{"readme":"README.md","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,"governance":null}},"created_at":"2023-07-09T18:31:33.000Z","updated_at":"2024-02-25T06:02:10.000Z","dependencies_parsed_at":"2023-09-15T10:01:44.767Z","dependency_job_id":"fe1371bf-7ff8-44ee-9221-24ac1fca26fc","html_url":"https://github.com/kosperera/skol-resthooks-try-fabric","commit_stats":null,"previous_names":["kosalanuwan/skol-resthooks-try-fabric","therealkosala/skol-resthooks-try-fabric","kosperera/skol-resthooks-try-fabric"],"tags_count":0,"template":false,"template_full_name":"alertbox/try-dotnet-on-azure","purl":"pkg:github/kosperera/skol-resthooks-try-fabric","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fskol-resthooks-try-fabric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fskol-resthooks-try-fabric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fskol-resthooks-try-fabric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fskol-resthooks-try-fabric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kosperera","download_url":"https://codeload.github.com/kosperera/skol-resthooks-try-fabric/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosperera%2Fskol-resthooks-try-fabric/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31938670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["architecture-center","csharp","dotnet","resthooks","sample-project","service-fabric","webhooks"],"created_at":"2024-10-14T03:05:34.181Z","updated_at":"2026-04-17T17:32:06.709Z","avatar_url":"https://github.com/kosperera.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RESThooks on Microsoft Service Fabric\n\n\u003cimg align=\"center\" alt=\"RESThooks\" width=\"100%\" src=\"./docs/Architecture.jpg\" /\u003e\n\nThis is a flavor of [RESThooks][resthooks] implementation on Microsoft Service Fabric.\n\n\u003e Originally, this was created to tryout a scalable publisher/subscriber design around a message broker like [RabbitMQ][rmq] or [Azure Service Bus][asb].\n\n[resthooks]: https://resthooks.io\n[rmq]: https://\n[asb]: https://\n\n### What's included:\n\nIn case you were wondering, this code is:\n\n- Originally, written on a Mac with Windows 10 in Colombo, Sri Lanka.\n- Written in C# with Visual Studio 2022.\n- Built on .NET 7 with Service Fabric.\n- Pub/Sub as Fanout on RabbitMQ, thanks Docker.\n- Stored as JSON-data on Azure SQL, thanks to Docker.\n- Served with Mock Servers on Postman.\n\n\n\n## Build and Run from the Source\n\nIf you are completely new to .NET and Service Fabric, the [.NET Learning Center][ms-docs-dotnet-learning-center] is a good source of information. First, you want to ensure [Service Fabric Local Cluster][sf-local-devenv-setup] is up and running. Then you can build and run from the source, like you typically do for any other .NET project.\n\n[ms-docs-dotnet-learning-center]: https://dotnet.microsoft.com/en-us/learn\n[sf-local-devenv-setup]: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started\n\n\n\nWith SF Local Cluster Manager:\n\n- Reset Local Cluster.\n- Switch Cluster Mode to `1 Node`, and\n- Start Local Cluster.\n\nWith Visual Studio:\n\n- Set Startup Project to `src/Host/Skol.Resthooks.Fabric.sfproj`.\n- Ensure Solution Platform is set to `x64`.\n- Press `F5` to launch the project.\n\n\n\n## Emulate Azure SQL and RabbitMQ\n\nFirst, you want to ensure Docker is up and running. Then you'll be able to spin up Azure SQL for data and RabbitMQ for messaging. Luckily, `.devcontainer/` directory contains the `compose-dev.yml` script.\n\n\n\nWith Terminal:\n\n- Run `docker info` to verify Docker is up and running.\n\n- Run `docker compose -f .devcontainer/compose-dev.yml up -d`.\n\n\n\n## Create a SQL Database for Subscriptions\n\nNext, you want to create a database with the seed data.\n\n\n\nWith Azure Data Studio:\n\n- Connect to SQL Server `localhost`.\n- Create a new database `Rh_IntentsDb`.\n\n- Open the Database Project in `db/Skol.Resthooks.SqlDb` directory, and\n- Publish.\n\n\u003e #### TODO\n\u003e\n\u003e It's not recommended to hardcode things such as database *Connection String*. So it's advisable to move them to Service Fabric Configuration or Azure Key Vault or any other preferred location like they usually do.\n\n\n\n## Things to Tryout\n\nFinally, you want to subscribe for a few topics, and then you can receive notifications. _Mocking with the Postman API_ is a good source to setup a few API endpoints with a mock server. Then you can tryout!\n\n\n\nWith VS Code:\n\n- Install [REST-client extension][vscode-rest-client-ext].\n- Create a `.env` file inside the `tests/e2e/` directory, and\n- Paste the `HOST` and the `HOST_API_KEY` of your Mock Server.\n\n[vscode-rest-client-ext]: https://marketplace.visualstudio.com/items?itemName=humao.rest-client\n\n\n\n### Topics\n\n- `GET https://localhost:9059/v1/topics` to list all the available topics to subscribe.\n\n### Subscriptions\n\n- `GET https://localhost:9059/v1/subscriptions` to list all the subscriptions.\n- `POST https://localhost:9059/v1/subscription` to subscribe for one or more topics.\n- `GET https://localhost:9059/v1/subscription/id/{guid}` to see the details of a subscription.\n- `PATCH https://localhost:9059/v1/subscription/id/{guid}/activate` to activate the subscription.\n- `DELETE https://localhost:9059/v1/subscription/id/{guid}` to unsubscribe.\n\n### Messaging\n\n- `POST https://localhost:8172/v1/messaging/publish` to send messages for subscribers.\n\n\n\n## License\n\nCopyright (c) Alertbox Inc. All rights reserved.\n\nThe source code is license under the [MIT license](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosperera%2Fskol-resthooks-try-fabric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkosperera%2Fskol-resthooks-try-fabric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosperera%2Fskol-resthooks-try-fabric/lists"}