Our messages
For this microservice, we are going to create custom messages for bonds and for CDSs. The following code shows what they look like when completed. Notice that we use the queue
attribute to make sure the end location of the message is correctly known—at least the queue
and exchange
parts anyways!
CDS-request message
This is how our CreditDefaultSwapRequestMessage
looks. You can see that we use the queue
and exchange
attributes to direct our message to the correct queue
and exchange
:
[Queue("Financials", ExchangeName = "EvolvedAI")] [Serializable] public class CreditDefaultSwapRequestMessage { public double fixedRate { get; set; } public double notional { get; set; } public double recoveryRate {get; set;} public double fairRate { get; set; } public double fairNPV { get; set; } }
Bonds request message
[Queue("Financial", ExchangeName = "EvolvedAI")] [Serializable] public class BondsRequestMessage { public DateTime issue { get; set; } public DateTime maturity { get; set; } public double...