Repository navigation
Expand file tree
/
Copy pathIMessageHandler.cs
More file actions
39 lines (33 loc) · 1.67 KB
/
Copy pathIMessageHandler.cs
File metadata and controls
39 lines (33 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//DO NOT Change the namespace.
namespace ProjectExtensions.Azure.ServiceBus {
/// <summary>
/// Basic message Handler
/// </summary>
/// <typeparam name="T">The type of message to be handled.</typeparam>
/// <remarks>A new handler will be instantiated for each message unless you decorate your handler class with [SingletonMessageHandler]</remarks>
public interface IMessageHandler<T> {
/// <summary>
/// Process a Message with the given signature.
/// </summary>
/// <param name="message">The message to handle.</param>
/// <remarks>
/// Every message received by the bus with this message type will call this method.
/// </remarks>
void Handle(IReceivedMessage<T> message);
}
/// <summary>
/// Interface that needs to be implemented if you wish to register a subscription.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <remarks>A new handler will be instantiated for each message unless you decorate your handler class with [SingletonMessageHandler]</remarks>
public interface IHandleMessages<T> : IMessageHandler<T> {
}
/// <summary>
/// Interface that needs to be implemented if you wish to register a competing subscription.
/// </summary>
/// <remarks>This implementation will allow the Topic to scale out, allowing multiple subscibers to handle the messages sent.</remarks>
/// <typeparam name="T"></typeparam>
/// <remarks>A new handler will be instantiated for each message unless you decorate your handler class with [SingletonMessageHandler]</remarks>
public interface IHandleCompetingMessages<T> : IMessageHandler<T> {
}
}