Skip to content

Conversation

@yang-xiaodong
Copy link
Member

@yang-xiaodong yang-xiaodong commented Nov 18, 2025

Description:

#1756

Add support for .NET 10

Changes:

  • Removed. NET 6 support and now supports. NET8-.NET10..
  • Improve the documentation.
  • Asynchronize most functions.
  • Update CI.
  • Upgrade nuget packages to latest version.

# 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.
@dotnetcore dotnetcore deleted a comment from drakhmanovmc Nov 18, 2025
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.18" />
Copy link
Contributor

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?

Copy link
Member Author

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

@yang-xiaodong yang-xiaodong merged commit c025eb3 into master Nov 19, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants