Beispiel #1
0
 public void StartListening(IMessageSettings inMessageSettings, CancellationTokenSource cancellationTokenSource = null)
 {
     consumer.Subscribe(inMessageSettings.MessageSettings["listening.ontopic"]);
     _processor.Type = inMessageSettings.MessageSettings["listening.ontopic"];
     while (!cancellationTokenSource?.IsCancellationRequested ?? true)
     {
         //Default time was 100 milisecond. I change it to 200 to reduce server load
         consumer.Poll(TimeSpan.FromMilliseconds(200));
     }
 }
Beispiel #2
0
 private void Broker_TestSendMessage(IMessage message, IMessageSettings messageSettings)
 {
     Message = message;
     Topic   = messageSettings.MessageSettings["produce.ontopic"];
     Console.WriteLine("Announcer sending fake message");
 }
 public void AnnouncerReceiveMessage(IMessage message, IMessageSettings settings)
 {
     OnMessageSending(message, settings);
 }
Beispiel #4
0
 public void StartListening(IMessageSettings inMessageSettings, CancellationTokenSource cancellationTokenSource = null)
 {
 }