public void Send(TradeRequest tradeRequest)
 {
     NmsTemplate.ConvertAndSendWithDelegate(tradeRequest, delegate(IMessage message)
     {
         message.NMSReplyTo       = defaultReplyToQueue;
         message.NMSCorrelationID = new Guid().ToString();
         return(message);
     });
 }
Ejemplo n.º 2
0
        public void PublishUsingDict(string ticker, double price)
        {
            IDictionary marketData = new Hashtable();

            marketData.Add("TICKER", ticker);
            marketData.Add("PRICE", price);
            NmsTemplate.ConvertAndSendWithDelegate("APP.STOCK.MARKETDATA", marketData,
                                                   delegate(IMessage message)
            {
                message.NMSPriority      = MsgPriority.Normal;
                message.NMSCorrelationID = new Guid().ToString();
                return(message);
            });
        }