feat: Add exclusive node with parallel processing feature#1640
Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom Aug 19, 2025
Merged
Conversation
- Added ExclusiveNodeWithParallelism() method for single-node exclusive processing with configurable parallelism - Added ExclusiveNodeWithSessionOrdering() for maintaining order within sessions while allowing parallel session processing - Added Azure Service Bus specific extensions for session-based processing - Added comprehensive unit tests covering all scenarios - Added detailed documentation with examples and troubleshooting - Includes validation for parameters and warnings for high parallelism values This feature fills the gap between competing consumers and strict ordering, providing a valuable middle-ground option for scenarios requiring single-node consistency with parallel processing for improved throughput.
Member
|
Oh, sweet! Are you w/ Improving? |
Contributor
Author
|
That's an excellent guess and the answer is yes lol. |
This was referenced Aug 22, 2025
This was referenced Sep 2, 2025
This was referenced Sep 15, 2025
This was referenced Sep 22, 2025
This was referenced Oct 13, 2025
This was referenced Oct 23, 2025
This was referenced Mar 1, 2026
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.
Add Exclusive Node with Parallel Processing Feature
Summary
This PR introduces a new feature that fills the gap between competing consumers (all nodes, full parallelism) and strict ordering (single node, single thread). The new
ExclusiveNodeWithParallelismconfiguration allows for single-node exclusive processing while maintaining configurable parallelism for improved throughput.Motivation
Currently, Wolverine offers two main execution patterns:
ListenWithStrictOrdering): Single node, single thread processingThere's a missing middle ground for scenarios where you need:
This is particularly useful for:
Changes
Core Implementation
ExclusiveNodeWithParallelism(int maxParallelism = 10, string? endpointName = null)toListenerConfigurationExclusiveNodeWithSessionOrdering(int maxParallelSessions = 10, string? endpointName = null)for session-based ordering scenariosAzure Service Bus Integration
AzureServiceBusListenerConfigurationExtensionswith specialized methods:ExclusiveNodeWithSessions()- Combines session requirements with exclusive node configurationExclusiveNodeWithParallelism()- For topic subscriptions without sessionsTesting
ExclusiveNodeWithParallelismTests.cscovering:Documentation
docs/guide/messaging/exclusive-node-processing.mdincluding:Breaking Changes
None. This change is fully backward compatible as it only adds new methods without modifying existing ones.
Testing
All tests pass:
Usage Example
Checklist
_prefix for private fields)feature/exclusive-node-with-parallelism)Notes for Reviewers
ListenerScope.Exclusivewith modified execution options to achieve the desired behaviorExclusiveNodeProcessingtoExclusiveNodeWithParallelismfor consistency