public void Send(TradeRequest tradeRequest)
 {
     RabbitTemplate.ConvertAndSend(tradeRequest, delegate(Message message)
     {
         message.MessageProperties.ReplyToAddress = new Address(defaultReplyToQueue);
         message.MessageProperties.CorrelationId = new Guid().ToByteArray();
         return message;
     });
 }
        public void SendTradeRequest(string symbol, int quantity, string account, bool buyRequest)
        {
            TradeRequest tradeRequest = new TradeRequest();
            tradeRequest.AccountName = account;
            tradeRequest.BuyRequest = buyRequest;
            tradeRequest.OrderType = "MARKET";
            tradeRequest.Quantity = quantity;
            tradeRequest.RequestId = NextRequest();
            tradeRequest.Ticker = symbol;
            tradeRequest.UserName = "******";

            log.Info("Sending TradeRequest: " + tradeRequest);
            stockService.Send(tradeRequest);
        }