Once we have received a request for bond information, calculated all the bond information, and posted the response, someone will be listening for the results. They do that by subscribing to BondsResponseMessage as follows. As soon as they do this, they will only be receiving the responses, which means we are only interested in the final results. Once we receive this message, we can post the details of the bond, perform another step in our workflow, and so forth:
public bool ProcessBondsResponse(BondsResponseMessage msg)
{
Console.WriteLine(msg.message + ":n"
+ " issue: " + msg.issue + "n"
+ " maturity: " + msg.maturity + "n"
+ " coupon: " + msg.coupon + "n"
+ " frequency: " + msg.frequency + "nn"
+ " yield: " + msg.yield + " "
+ msg.compounding + "...