-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Support for .NET 10 #1769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for .NET 10 #1769
Conversation
# Conflicts: # samples/Sample.RabbitMQ.MySql/Sample.RabbitMQ.MySql.csproj # src/DotNetCore.CAP.AzureServiceBus/AzureServiceBusConsumerClient.cs # src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
# Conflicts: # src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
Replaced synchronous `Connect` with `ConnectAsync` to avoid blocking threads during queue creation. Added `ConfigureAwait(false)` to all asynchronous calls to prevent deadlocks in environments with synchronization contexts. Updated methods (`FetchTopicsAsync`, `SubscribeAsync`, `ListeningAsync`, `CommitAsync`, `RejectAsync`, and `GenerateSqsAccessPolicyAsync`) to use asynchronous patterns and ensure non-blocking behavior. Refactored `ConnectAsync` for thread safety by adding checks and `lock` statements during SNS and SQS client initialization. Made queue URL creation asynchronous. Updated RabbitMQ consumer client to replace synchronous `BasicQosAsync` calls with `await` for proper asynchronous behavior. These changes improve performance, scalability, and maintainability by eliminating blocking calls, ensuring thread safety, and enhancing code readability.
Updated README.md to improve accessibility, enhance documentation, and provide clearer examples for installation, configuration, and usage. Added details on key features, delayed messaging, and subscription patterns. Improved dashboard documentation with service discovery details. Refactored code to remove obsolete methods and properties: - Removed `WithTopic` in `ServiceBusProducerDescriptorBuilder.cs`. - Deprecated `ConnectionString` in favor of `DataSource` in PostgreSQL options. - Removed `EnableConsumerPrefetch` in favor of `EnableSubscriberParallelExecute`. These changes enhance usability, maintainability, and developer experience.
This commit adds `ErrorCode.Local_TimedOut` to the `RetriableErrorCodes` list in the `KafkaOptions` class. This change allows the system to retry operations when the `Local_TimedOut` error occurs, improving error handling and system reliability.
Updated project files to include net9.0 as a target framework, adding necessary package references for compatibility. Refactored the `FindConsumersFromInterfaceTypes` method to improve clarity, efficiency, and error handling. Consolidated keyed and non-keyed service processing into a single-pass scan and introduced consistent error messages for better diagnostics. Removed redundant code and preprocessor directives, modernized variable naming, and enhanced code readability with structured comments. These changes improve maintainability and ensure compatibility with the new target framework.
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Dapper" Version="2.1.66" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.18" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a version 10 of Microsoft.AspNetCore.Authentication.JwtBearer, do you want to use that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sample.RabbitMQ.MySql project using net8.0 as the framework, because Pomelo.EntityFrameworkCore.MySql not support net10 now
Description:
#1756
Add support for .NET 10
Changes: