Пример #1
0
 public virtual void MessageHandle(string topic, string message)
 {
     Logger.Debug($"Receive message on topic {topic}");
     try
     {
         var eventData = _remoteEventSerializer.Deserialize <RemoteEventData>(message);
         var eventArgs = new RemoteEventArgs(eventData, topic, message);
         _eventBus.Trigger(this, new RemoteEventBusHandlingEvent(eventArgs));
         _eventBus.Trigger(this, eventArgs);
         _eventBus.Trigger(this, new RemoteEventBusHandledEvent(eventArgs));
     }
     catch (Exception ex)
     {
         Logger.Error("Consume remote message exception", ex);
         _eventBus.Trigger(this, new RemoteEventMessageHandleExceptionData(ex, topic, topic));
     }
 }
Пример #2
0
 public void HandleEvent(RemoteEventArgs eventData)
 {
 }