[英]Azure Service Bus and MassTransit iConsumer business logic
Hello new to Azure Service Bus and MassTransit but love the simplicity.您好 Azure Service Bus 和 MassTransit 的新手,但喜欢简单。 I see most examples show a worker class to handle the Consume implementation in a consuming service.
我看到大多数示例显示工作人员 class 来处理消费服务中的消费实现。 I assume then after the message is consumed and may have a JSON payload does the event model worker start the business logic with in the domain?
我假设在消息被使用并且可能具有 JSON 有效负载之后,事件 model 工作人员是否在域中启动业务逻辑?
A consumer, which is the most common consumer type, is a class that consumes one or more messages types.消费者是最常见的消费者类型,它是一个消费一种或多种消息类型的 class。 For each message type, the
IConsumer<T>
interface is implemented where T
is the consumed message type.对于每种消息类型,都实现了
IConsumer<T>
接口,其中T
是使用的消息类型。 The interface has one method, Consume,该接口有一个方法,Consume,
Below is the example of IConsumer
Interface下面是
IConsumer
接口的例子
public interface IConsumer<in TMessage> :
IConsumer
where TMessage : class
{
Task Consume(ConsumeContext<TMessage> context);
}
For complete Information check Mass Transit Consumers.如需完整信息,请查看 公共交通消费者。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.