Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed binding creation from configuration project. Removed binding …

…when client application closes.

Signed-off-by: DonMcRae <Don@McRaeSoft.com>
  • Loading branch information...
commit 997cd1939740a905be25abe651c7cea812cbb423 1 parent 38e035b
@DonMcRae DonMcRae authored
View
3  Spring.RabbitQuickStart/src/Spring/Spring.RabbitQuickStart.BrokerConfiguration/Program.cs
@@ -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();
View
5 Spring.RabbitQuickStart/src/Spring/Spring.RabbitQuickStart.Client/UI/StockForm.cs
@@ -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);
+ }
}
}
View
1  Spring.RabbitQuickStart/src/Spring/Spring.RabbitQuickStart.Client/UI/StockForm.designer.cs
@@ -167,6 +167,7 @@ private void InitializeComponent()
this.Controls.Add(this.tradeRequestButton);
this.Name = "StockForm";
this.Text = "TradeForm";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.StockForm_FormClosing);
this.Load += new System.EventHandler(this.StockForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
Please sign in to comment.
Something went wrong with that request. Please try again.