Пример #1
0
 static MessageService()
 {
     producer = MessageBrokerFabric.CreateProducer(Properties.Settings.Default.MessageBrokerNetwork, new Uri(Properties.Settings.Default.MessageBrokerUri));
     consumer = MessageBrokerFabric.CreateConsumer(Properties.Settings.Default.MessageBrokerNetwork, new Uri(Properties.Settings.Default.MessageBrokerUri));
     consumer.MessageReceived += consumer_MessageReceived;
     //producer.SendMessage(new Message(Serializer.Serialize(new PingMessage(new PingId(DateTime.Now.Ticks.ToString()))))); //test envío
 }
Пример #2
0
 static MessageService()
 {
     producer  = MessageBrokerFabric.CreateProducer(Properties.Settings.Default.MessageBrokerNetwork, new Uri(Properties.Settings.Default.MessageBrokerUri));
     consumer  = MessageBrokerFabric.CreateConsumer(Properties.Settings.Default.MessageBrokerNetwork, new Uri(Properties.Settings.Default.MessageBrokerUri));
     delegates = new Dictionary <Task, IConsumer.MessageReceivedHandler>();
 }