Ejemplo n.º 1
0
        public async Task <bool> Notice(EventSubscribeInfo info, EventPublishMessage message)
        {
            try
            {
                //get processor
                var eventProcessor = this.serviceProvider.GetRequiredServiceByName <IEventProcessor>(info.Group);
                if (message.Event is IEvent @event)
                {
                    await eventProcessor.Tell(new EventProccessBufferWrap(@event));

                    return(true);
                }
            }
            catch (Exception ex)
            {
                this.logger.LogError(ex, $"{info.Group}.{info.Topic}->{ message.TypeCode } process failed");
            }
            return(false);
        }
Ejemplo n.º 2
0
 public Task <bool> Publish(string topic, EventPublishMessage model)
 {
     throw new NotImplementedException();
 }