Beispiel #1
0
 void _timProducer_Elapsed(object sender, ElapsedEventArgs e)
 {
     countOfMessages++;
     string msg = "Hello from .NET count =" + countOfMessages.ToString() +"'";
     var corpmessage = new CorpMessage();
     corpmessage.Text = msg;
     corpmessage.Subject = countOfMessages.ToString();
     log.Debug("Sending message json=" + Newtonsoft.Json.JsonConvert.SerializeObject(corpmessage));
     var objectMessage = _amqProducer.CreateObjectMessage(corpmessage);
     _amqProducer.Send(objectMessage);
     _rabbitBus.Publish<CorpMessage>(corpmessage);
 }
Beispiel #2
0
 private void _rabbitMQConsumer_Listener(CorpMessage corpmessage)
 {
     //log.Debug("Inside RabbiitMQ listener event.");
     if (corpmessage != null)
         log.Info("RabbiitMQ received message json=" + Newtonsoft.Json.JsonConvert.SerializeObject(corpmessage));
 }