Interface IConsumer<TMessage, TResponseMessage>
Represents a consumer of a message. The message is wrapped in a ConsumeContext instance to allow access to details surrounding the inbound message.
Namespace: Copper.Remoting.InMemory.Common.V1.Interface
Assembly: Copper.Remoting.InMemory.Common.dll
Syntax
public interface IConsumer<TMessage, TResponseMessage> : IConsumer where TMessage : class where TResponseMessage : class
Type Parameters
Name | Description |
---|---|
TMessage | |
TResponseMessage |
Methods
View SourceConsume(ConsumeContext<TMessage>)
Consumes a message
Declaration
Task<TResponseMessage> Consume(ConsumeContext<TMessage> context)
Parameters
Type | Name | Description |
---|---|---|
ConsumeContext<TMessage> | context | The consume context. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResponseMessage> | A System.Threading.Tasks.Task that represents outstanding operation. The result of the Task is the value returned by the service. |