{"id":22350654,"url":"https://github.com/timmoth/asyncmonolith","last_synced_at":"2025-11-01T22:30:37.863Z","repository":{"id":242566875,"uuid":"809926758","full_name":"Timmoth/AsyncMonolith","owner":"Timmoth","description":"Facilitates simple durable and asynchronous messaging in dotnet apps.","archived":false,"fork":false,"pushed_at":"2024-08-20T14:10:37.000Z","size":3139,"stargazers_count":61,"open_issues_count":10,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T16:49:56.168Z","etag":null,"topics":["async","csharp","dotnet","efcore","messaging","outbox","scheduler","transactional"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Timmoth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-03T18:07:00.000Z","updated_at":"2025-02-06T15:26:17.000Z","dependencies_parsed_at":"2024-08-06T09:53:06.803Z","dependency_job_id":"99b9b260-1b75-4596-aa1a-c525edb4cbab","html_url":"https://github.com/Timmoth/AsyncMonolith","commit_stats":null,"previous_names":["timmoth/asyncmonolith"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FAsyncMonolith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FAsyncMonolith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FAsyncMonolith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timmoth%2FAsyncMonolith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Timmoth","download_url":"https://codeload.github.com/Timmoth/AsyncMonolith/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239340496,"owners_count":19622702,"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":["async","csharp","dotnet","efcore","messaging","outbox","scheduler","transactional"],"created_at":"2024-12-04T11:12:41.279Z","updated_at":"2025-11-01T22:30:37.812Z","avatar_url":"https://github.com/Timmoth.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AsyncMonolith ![Logo](AsyncMonolith/logo.png)\n[![Ef](https://img.shields.io/nuget/v/AsyncMonolith.Ef?label=Ef)](https://www.nuget.org/packages/AsyncMonolith.Ef)\n[![MySql](https://img.shields.io/nuget/v/AsyncMonolith.MySql?label=MySql)](https://www.nuget.org/packages/AsyncMonolith.MySql)\n[![MsSql](https://img.shields.io/nuget/v/AsyncMonolith.MsSql?label=MsSql)](https://www.nuget.org/packages/AsyncMonolith.MsSql)\n[![PostgreSql](https://img.shields.io/nuget/v/AsyncMonolith.PostgreSql?label=PostgreSql)](https://www.nuget.org/packages/AsyncMonolith.PostgreSql)\n[![MariaDb](https://img.shields.io/nuget/v/AsyncMonolith.MariaDb?label=MariaDb)](https://www.nuget.org/packages/AsyncMonolith.MariaDb)\n\nAsyncMonolith is a lightweight library that facilitates simple, durable and asynchronous messaging in dotnet apps.\n\n### Overview:\n- Speed up your API by offloading tasks to a background worker.\n- Distribute workload amongst multiple app instances.\n- Execute tasks at specific times or after a delay.\n- Execute tasks at regular intervals.\n- Simplify complex processes by building out an event-driven architecture.\n- Decouple your services by utilizing the Mediator pattern.\n- Improve your application's resiliency by utilizing the Transactional Outbox pattern.\n- Improve your application's resiliency by utilizing automatic retries.\n- Keep your infrastructure simple without using a message broker.\n- Simplify testability.\n\n\n\u003e [!NOTE]  \n\u003e Despite its name, AsyncMonolith can be used within a microservices architecture. The only requirement is that the producers and consumers share the same database i.e messaging within a single project. However, it is not suitable for passing messages between different projects in a microservices architecture, as microservices should not share the same database. \n\n## Find out more 🤔\n  - [Overview ✅](https://timmoth.github.io/AsyncMonolith/index)\n  - [Quick start ▶️](https://timmoth.github.io/AsyncMonolith/quickstart)\n  - [Internals 🧠](https://timmoth.github.io/AsyncMonolith/internals)\n  - [Releases 📒](https://timmoth.github.io/AsyncMonolith/releases)\n  - [Warnings ⚠️](https://timmoth.github.io/AsyncMonolith/warnings)\n  - [Support 🛟](https://timmoth.github.io/AsyncMonolith/support)\n  - [Demo App ✨](https://timmoth.github.io/AsyncMonolith/demo)\n  - [Contributing 🙏](https://timmoth.github.io/AsyncMonolith/contributing)\n  - [Tests 🐞](https://timmoth.github.io/AsyncMonolith/tests)\n\nCheck out [this video](https://www.youtube.com/watch?v=DOaDpHh1FsQ) from Derek Comartin, for some thoughts on using a database as a queue\n\n## Guides\n  - [Producing messages](https://timmoth.github.io/AsyncMonolith/guides/producing-messages/)\n  - [Scheduling messages](https://timmoth.github.io/AsyncMonolith/guides/scheduling-messages/)\n  - [Consuming messages](https://timmoth.github.io/AsyncMonolith/guides/consuming-messages/)\n  - [Changing messages](https://timmoth.github.io/AsyncMonolith/guides/changing-messages/)\n  - [Open Telemetry](https://timmoth.github.io/AsyncMonolith/guides/opentelemetry/)\n\n    \n## Posts\n  - [What is the Transactional Outbox?](https://timmoth.github.io/AsyncMonolith/posts/transactional-outbox/)\n  - [What is the Mediator pattern?](https://timmoth.github.io/AsyncMonolith/posts/mediator/)\n  - [What is Idempotency?](https://timmoth.github.io/AsyncMonolith/posts/idempotency/)\n\n## Quick Demo\nProducing and scheduling messages\n```csharp\n  // Publish 'UserDeleted' to be processed in 60 seconds\n  await _producerService.Produce(new UserDeleted()\n  {\n    Id = id\n  }, 60);\n  \n // Publish 'CacheRefreshScheduled' every Monday at 12pm (UTC) with a tag that can be used to modify / delete related scheduled messages.\n _scheduleService.Schedule(new CacheRefreshScheduled\n   {\n       Id = id\n   }, \"0 0 12 * * MON\", \"UTC\", \"id:{id}\");\n await _dbContext.SaveChangesAsync(cancellationToken);\n```\nConsuming messages\n```csharp\n[ConsumerTimeout(5)] // Consumer timeouts after 5 seconds\n[ConsumerAttempts(1)] // Consumer messages moved to poisoned table after 1 failed attempt\npublic class DeleteUsersPosts : BaseConsumer\u003cUserDeleted\u003e\n{\n    private readonly ApplicationDbContext _dbContext;\n\n    public ValueSubmittedConsumer(ApplicationDbContext dbContext)\n    {\n        _dbContext = dbContext;\n    }\n\n    public override Task Consume(UserDeleted message, CancellationToken cancellationToken)\n    {\n        ...\n\t\tawait _dbContext.SaveChangesAsync(cancellationToken);\n    }\n}\n```\n## Collaboration 🙏\nLike the idea and want to get involved? Check out the open issues or shoot me a message if you've got any ideas / feedback!\n\n## Support 🛟\nNeed help? Ping me on [linkedin](https://www.linkedin.com/in/timmoth/) and I'd be more then happy to jump on a call to debug, help configure or answer any questions.\n\n## Discord\nCome say hello on the [Discord server](https://discord.gg/ZPqVWptK5B)\n\n## Support the project 🤝\n\n- **🌟 Star this repository**: It means a lot to me and helps with exposure.\n- **🪲 Report bugs**: Report any bugs you find by creating an issue.\n- **📝 Contribute**: Read the [contribution guide](https://timmoth.github.io/AsyncMonolith/contributing) then pick up or create an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmoth%2Fasyncmonolith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimmoth%2Fasyncmonolith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmoth%2Fasyncmonolith/lists"}