Permalink
Browse files

Removed binding creation from configuration project. Removed binding …

…when client application closes.

Signed-off-by: DonMcRae <Don@McRaeSoft.com>
  • Loading branch information...
1 parent 38e035b commit 997cd1939740a905be25abe651c7cea812cbb423 @DonMcRae DonMcRae committed Oct 17, 2011
@@ -48,9 +48,6 @@ static void Main(string[] args)
Queue mktDataQueue = new Queue(ConfigurationManager.AppSettings["MARKET_DATA_QUEUE_NAME"]);
amqpAdmin.DeclareQueue(mktDataQueue);
- //Create the Exchange for MarketData Requests if it does not already exist.
- amqpAdmin.DeclareBinding(BindingBuilder.Bind(mktDataQueue).To(mktDataExchange).With(ConfigurationManager.AppSettings["MARKET_DATA_ROUTING_KEY"]));
-
Console.WriteLine("Queues and exchanges have been declared.");
Console.WriteLine("Press 'enter' to exit");
Console.ReadLine();
@@ -159,5 +159,10 @@ private void RebindQueue(string routingKey)
log.ErrorFormat("Uncaught application exception.", ex);
}
}
+
+ private void StockForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ RebindQueue(string.Empty);
+ }
}
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 997cd19

Please sign in to comment.