Class SubscribeAttribute
Used to identify the methods that have to be subscribed to the messages stream. The first parameter of the subscriber method always correspond to the message and must be declared with a type compatible with the message to be received (the message type, a base type or an implemented interface) or a collection of items of that type. The methods can be either synchronous or asynchronous (returning a Task) and don't need to be publicly visible.
Inherited Members
Namespace: Silverback.Messaging.Subscribers
Assembly: Silverback.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Method)]
public sealed class SubscribeAttribute : Attribute
Properties
| Improve this doc View sourceExclusive
Gets or sets a value indicating whether the method can be executed concurrently to other methods
handling the same message. The default value is true
(the method will be executed
sequentially to other subscribers).
Declaration
public bool Exclusive { get; set; }
Property Value
Type | Description |
---|---|
bool |