Interface IMessageStreamProvider
Relays the streamed messages to all the linked MessageStreamEnumerable<TMessage>.
Namespace: Silverback.Messaging.Messages
Assembly: Silverback.Core.dll
Syntax
public interface IMessageStreamProvider
Properties
| Improve this doc View sourceMessageType
Gets the type of the messages being streamed.
Declaration
Type MessageType { get; }
Property Value
Type | Description |
---|---|
Type |
StreamsCount
Gets the number of IMessageStreamEnumerable<TMessage> that have been created via CreateStream(Type, IReadOnlyCollection<IMessageFilter>?) or CreateStream<TMessage>(IReadOnlyCollection<IMessageFilter>?).
Declaration
int StreamsCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Improve this doc View sourceCreateLazyStream(Type, IReadOnlyCollection<IMessageFilter>?)
Creates a new ILazyMessageStreamEnumerable<TMessage> that will be linked with this
provider and will create the IMessageStreamEnumerable<TMessage> as soon as a message
matching the type messageType
is pushed.
Declaration
ILazyMessageStreamEnumerable<object> CreateLazyStream(Type messageType, IReadOnlyCollection<IMessageFilter>? filters = null)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the messages to be streamed to the linked stream. |
IReadOnlyCollection<IMessageFilter> | filters | The filters to be applied. |
Returns
Type | Description |
---|---|
ILazyMessageStreamEnumerable<object> | The linked ILazyMessageStreamEnumerable<TMessage>. |
CreateLazyStream<TMessage>(IReadOnlyCollection<IMessageFilter>?)
Creates a new ILazyMessageStreamEnumerable<TMessage> that will be linked with this
provider and will create the IMessageStreamEnumerable<TMessage> as soon as a message
matching the type TMessage
is pushed.
Declaration
ILazyMessageStreamEnumerable<TMessage> CreateLazyStream<TMessage>(IReadOnlyCollection<IMessageFilter>? filters = null)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<IMessageFilter> | filters | The filters to be applied. |
Returns
Type | Description |
---|---|
ILazyMessageStreamEnumerable<TMessage> | The linked ILazyMessageStreamEnumerable<TMessage>. |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the messages to be streamed to the linked stream. |
CreateStream(Type, IReadOnlyCollection<IMessageFilter>?)
Creates a new IMessageStreamEnumerable<TMessage> that will be linked with this
provider and will be pushed with the messages matching the type messageType
.
Declaration
IMessageStreamEnumerable<object> CreateStream(Type messageType, IReadOnlyCollection<IMessageFilter>? filters = null)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the messages to be streamed to the linked stream. |
IReadOnlyCollection<IMessageFilter> | filters | The filters to be applied. |
Returns
Type | Description |
---|---|
IMessageStreamEnumerable<object> | The linked IMessageStreamEnumerable<TMessage>. |
CreateStream<TMessage>(IReadOnlyCollection<IMessageFilter>?)
Creates a new IMessageStreamEnumerable<TMessage> that will be linked with this
provider and will be pushed with the messages matching the type TMessage
.
Declaration
IMessageStreamEnumerable<TMessage> CreateStream<TMessage>(IReadOnlyCollection<IMessageFilter>? filters = null)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<IMessageFilter> | filters | The filters to be applied. |
Returns
Type | Description |
---|---|
IMessageStreamEnumerable<TMessage> | The linked IMessageStreamEnumerable<TMessage>. |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the messages to be streamed to the linked stream. |