Request / Reply

In some cases you will send a message and expect a reply at some point from the downstream system, but you don't need the response right away and you don't care which node in your application handles the eventual reply. For that scenario, Jasper provides this functionality with the syntax shown below:

internal async Task using_global_request_and_reply(IMessageContext messaging)
    // Send a question to another application, and request that the handling
    // service send back an answer
    await messaging.SendAndExpectResponseFor<Answer>(new Question());