Skip to content

Message Handler

In order to handle a message sent to an endpoint you need to implement the IMessageHandler<> interface on a class that is typically called the message handler.

Methods

ProcessMessageAsync

c#
Task ProcessMessageAsync(IHandlerContext<T> context);

The <T> generic argument should be the type of the message class you are interested in. This method will contain the actual implementation code that reacts to the message that is passed in. The message instance is available via the context.Message property.