You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ispwd (via GitHub)" <gi...@apache.org> on 2026/05/10 15:19:51 UTC
[PR] Remove ParallelExtensionsExtras dependency, replace with SemaphoreSlim [rocketmq-clients]
ispwd opened a new pull request, #1244:
URL: https://github.com/apache/rocketmq-clients/pull/1244
### Which Issue(s) This PR Fixes
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
Remove obsolete ParallelExtensionsExtras dependency for .NET Core / .NET 5+ compatibility.
### Brief Description
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
**Problem:**
The `ParallelExtensionsExtras` NuGet package was originally designed for **.NET Framework only** and lacks support for .NET Core / .NET 5+. This caused compatibility warnings and prevented the library from being used in modern .NET projects without fallback mode.
**Solution:**
- Removed the `ParallelExtensionsExtras` NuGet package dependency entirely
- Replaced `LimitedConcurrencyLevelTaskScheduler` (from ParallelExtensionsExtras) with native .NET `SemaphoreSlim` to implement the same concurrency control behavior
- The `SemaphoreSlim` is initialized with `consumptionThreadCount` to limit concurrent message consumers, maintaining exactly the same semantic behavior as the original implementation
- No API changes - all public interfaces remain fully backward compatible
**Files Changed:**
- `ConsumeService.cs` - Changed from `TaskScheduler` to `SemaphoreSlim` for concurrency control
- `PushConsumer.cs` - Updated field type and initialization
- `FifoConsumeService.cs`, `StandardConsumeService.cs` - Updated constructor signatures
- `ConsumeServiceTest.cs` - Updated tests to match new implementation
- `rocketmq-client-csharp.csproj` - Removed `ParallelExtensionsExtras` package reference
### How Did You Test This Change?
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
**1. Unit Tests:** ✅ All 164 existing unit tests passed
```bash
dotnet test
# Passed! - Failed: 0, Passed: 164, Skipped: 0, Total: 164
```
**2. Concurrency Control Verification (Real RocketMQ Server):** ✅
- Deployed test against real RocketMQ server (127.0.0.1:8081)
- Configured consumer with `consumptionThreadCount = 3`
- Sent 20 messages with 200ms simulated consume delay
- **Verified max observed concurrent consumers = 3**, matching the configured limit
- All 20 messages successfully consumed within expected time
- SemaphoreSlim correctly limits parallelism, matching the original TaskScheduler behavior
**3. Backward Compatibility:** ✅
- Public API remains unchanged - existing user code requires no modifications
- Same `ConsumptionThreadCount` configuration option works exactly as before
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove ParallelExtensionsExtras dependency, replace with SemaphoreSlim [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1244:
URL: https://github.com/apache/rocketmq-clients/pull/1244#issuecomment-4665527256
This PR is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove ParallelExtensionsExtras dependency, replace with SemaphoreSlim [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1244:
URL: https://github.com/apache/rocketmq-clients/pull/1244#issuecomment-4997866406
This PR was closed because it has been inactive for 3 days since being marked as stale.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove ParallelExtensionsExtras dependency, replace with SemaphoreSlim [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1244:
URL: https://github.com/apache/rocketmq-clients/pull/1244#issuecomment-4953480471
This PR is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove ParallelExtensionsExtras dependency, replace with SemaphoreSlim [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #1244: Remove ParallelExtensionsExtras dependency, replace with SemaphoreSlim
URL: https://github.com/apache/rocketmq-clients/pull/1244
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org