Feature/Add Quartz.NET Integration for Background Job Scheduling#1263
Open
alnuaimicoder wants to merge 12 commits into
Open
Feature/Add Quartz.NET Integration for Background Job Scheduling#1263alnuaimicoder wants to merge 12 commits into
alnuaimicoder wants to merge 12 commits into
Conversation
- Add CommunityToolkit.Aspire.Hosting.Quartz (hosting integration) - Add CommunityToolkit.Aspire.Quartz (client integration) - Add CommunityToolkit.Aspire.Quartz.Abstractions (core abstractions) - Rename csproj files to match CommunityToolkit naming - Update package metadata Still TODO: - Update namespaces in C# files - Add unit and integration tests - Create example application - Add PublicAPI.txt files - Update documentation
- Remove custom metadata (handled by Directory.Build.props) - Add Description and AdditionalPackageTags - Update project references to use CommunityToolkit naming - Add 'client' and 'hosting' tags as required
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1263Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1263" |
- Add api/ folders to all three projects - Add PublicAPI.Shipped.txt (empty for new integration) - Add PublicAPI.Unshipped.txt with all public APIs - Follows CommunityToolkit API tracking conventions
- Update package names in all README files - Update installation instructions - Point to aspire.dev for documentation - Remove references to original repository
- Mark completed tasks - Update remaining tasks list - Add time estimates - Clarify next steps
- Add QuartzResourceTests for hosting integration - Add QuartzClientTests for client integration - Test resource creation and configuration - Test service registration - Test JobOptions and RetryPolicy - All tests follow xUnit conventions
- Added Quartz, Quartz.Extensions.Hosting, Quartz.Serialization.Json packages (v3.16.1) - Added Npgsql (v10.0.2) and Microsoft.Data.SqlClient (v6.1.4) - Created unit tests for hosting and client components - Added XML documentation comments for all public APIs - Fixed test implementations to match actual API signatures - All tests passing (10 total: 4 hosting + 6 client)
- Added SignalR Client (v10.0.5) and Npgsql.EntityFrameworkCore.PostgreSQL (v10.0.1) - Started Quartz example structure in examples/quartz/ - Fixed ServiceDefaults to use correct OpenTelemetry API - Example needs namespace cleanup (in progress)
- Fixed namespace conflict in QuartzJobScheduler.cs using global:: qualifier - Removed OpenApi calls (AddOpenApi, MapOpenApi) - not needed - Removed EF Core migration code - using built-in QuartzMigrationService - Deleted EF Core Data folder and migrations - Updated README files to clarify automatic database migration - All 10 unit tests passing - Example application builds successfully
- Added three Quartz packages to integrations table - Added shield badges and documentation links - Positioned alphabetically between Python and KurrentDB
- Added Hosting.Quartz.Tests to integration tests matrix - Added Quartz.Tests to client tests matrix - Tests will run automatically on PRs and main branch
- Added 4 example projects in /examples/quartz/ folder - Added 3 source libraries in /src/ folder - Added 2 test projects in /tests/ folder - All projects alphabetically ordered
Author
|
@dotnet-policy-service agree |
21 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1259
Overview
This PR adds a production-ready integration for background job scheduling using Quartz.NET in .NET Aspire applications.
.NET Aspire currently lacks native support for background job scheduling. Developers must manually integrate Quartz.NET or Hangfire, configure persistence, set up observability, and implement idempotency themselves. This integration solves that problem by providing an Aspire-native solution.
What's Included
Three Packages
CommunityToolkit.Aspire.Hosting.Quartz (Hosting Integration)
CommunityToolkit.Aspire.Quartz (Client Integration)
IBackgroundJobClientfor dynamic job schedulingCommunityToolkit.Aspire.Quartz.Abstractions (Core Abstractions)
IJob,IBackgroundJobClientJobOptions,RetryPolicy,JobContextKey Features
Usage Example
AppHost
API Service
Job Definition
Proof of Concept
This integration has been published and tested:
PR Checklist
What's Completed
✅ Core Implementation
✅ Testing
✅ Documentation
✅ Example Application
✅ Package Management
✅ API Tracking
✅ CI/CD Integration
✅ Solution Integration
Testing Coverage
Unit Tests (10 tests - All Passing ✅)
Client Tests (6 tests)
Hosting Tests (4 tests)
Integration Tests (Optional - Can be added later)
Other Information
Why This Integration Matters
Background job scheduling is a fundamental requirement for most production applications. Currently, .NET Aspire developers must:
This integration makes background jobs a first-class citizen in Aspire, just like databases, caches, and messaging.
Design Decisions
Aspire.Hostingfor discoverabilityMaintenance Commitment
I'm committed to:
Database Migration
The integration includes automatic database migration:
QuartzMigrationServicechecks if Quartz tables existProduction Features
Branch:
feature/add-quartz-integrationOriginal Repository: https://github.com/alnuaimicoder/aspire-hosting-quartz
Status: ✅ Ready for Review - All requirements met