Repository navigation
Streaming, notification pipelines, and timeouts - #18
Merged
Merged
Conversation
Introduce streaming requests and pipeline behaviors, notification pipeline behaviors with configurable publish strategies, and request timeout support. Add IStreamRequest<TResponse>, IStreamRequestHandler<TRequest,TResponse> (IAsyncEnumerable), ISender.CreateStream and IMediator.CreateStream; implement stream pipelines with IStreamPipelineBehavior and StreamHandlerDelegate. Add INotificationPipelineBehavior<TNotification>, NotificationHandlerDelegate, and PublishStrategy (Sequential/Parallel); publisher now resolves/ orders behaviors and builds a behavior->handlers pipeline honoring PipelineOrderAttribute and InterlinkOptions.PublishStrategy. Add TimeoutBehavior<TRequest,TResponse> and InterlinkOptions.DefaultRequestTimeout to cancel requests on timeout; register TimeoutBehavior automatically when configured. Extend InterlinkOptions with open behavior collections and Add...Behavior APIs and expose ServiceFactory; ServiceCollectionExtensions now registers options, open-generic behaviors, timeout behavior, and scans for stream/notification handlers and behaviors. Refactor Publisher and Sender to use InterlinkOptions and the service factory, build dynamic pipelines for notifications and streams, and use dynamic invocation for handlers. Tweak TypeScanner to skip open generic type definitions. Bump package to 1.6.0, add Microsoft.Bcl.AsyncInterfaces for netstandard2.0, and update README with examples and changelog.
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.
Introduce streaming requests and pipeline behaviors, notification pipeline behaviors with configurable publish strategies, and request timeout support. Add IStreamRequest, IStreamRequestHandler<TRequest,TResponse> (IAsyncEnumerable), ISender.CreateStream and IMediator.CreateStream; implement stream pipelines with IStreamPipelineBehavior and StreamHandlerDelegate. Add INotificationPipelineBehavior, NotificationHandlerDelegate, and PublishStrategy (Sequential/Parallel); publisher now resolves/ orders behaviors and builds a behavior->handlers pipeline honoring PipelineOrderAttribute and InterlinkOptions.PublishStrategy.
Add TimeoutBehavior<TRequest,TResponse> and InterlinkOptions.DefaultRequestTimeout to cancel requests on timeout; register TimeoutBehavior automatically when configured. Extend InterlinkOptions with open behavior collections and Add...Behavior APIs and expose ServiceFactory; ServiceCollectionExtensions now registers options, open-generic behaviors, timeout behavior, and scans for stream/notification handlers and behaviors. Refactor Publisher and Sender to use InterlinkOptions and the service factory, build dynamic pipelines for notifications and streams, and use dynamic invocation for handlers. Tweak TypeScanner to skip open generic type definitions. Bump package to 1.6.0, add Microsoft.Bcl.AsyncInterfaces for netstandard2.0, and update README with examples and changelog.