Skip to content

Streaming, notification pipelines, and timeouts - #18

Merged
manusoft merged 1 commit into
masterfrom
feature/interlink-update
Sep 25, 2026
Merged

manusoft merged 1 commit into
masterfrom
feature/interlink-update

Conversation

@manusoft

Copy link
Copy Markdown
Owner

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.

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.
@manusoft manusoft added this to the v1.6.0 milestone Sep 25, 2026
@manusoft manusoft self-assigned this Sep 25, 2026
@manusoft manusoft added the enhancement New feature or request label Sep 25, 2026
@manusoft
manusoft merged commit cb886d7 into master Sep 25, 2026
7 checks passed
@manusoft
manusoft deleted the feature/interlink-update branch September 25, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant