Ejemplo n.º 1
0
 protected override bool ReceiveMessage()
 {
     foreach (var topic in this.Topics)
     {
         var msgEntity = MemoryMessageBroker.Subscribe(topic);;
         if (msgEntity != null)
         {
             var message = msgEntity.Map <Envelope <IMessage> >();
             this.MessageReceived(new MessageReceivedEventArgs(message));
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
 public override void Send <T>(Envelope <T> message)
 {
     MemoryMessageBroker.Publish(message.Body, message.Topic);
 }