-
Notifications
You must be signed in to change notification settings - Fork 84
Multicast Request Response Take First
This is a variaton on the Multicast Request Response example. Instead of the scenario where we want to collect all responses we may only care about latency and the time to the first response.
In this Multicast Request Response we only take the first response and discard the rest.
To make the request on the bus we implement the same IBusRequest. This might look like:
public class FraudulentCardRequest : IBusRequest<FraudulentCardRequest, IsThisDodgyResponse>
{
}
And then we make a MulticastRequest on the bus and call First
var response = (await bus.MulticastRequest(request)).First();
To implement the handler to fulfil this request we implement IHandleRequest handler class as we would for a simple Request Response.
Azure Service Bus
Windows Service Bus
Redis
In Process
Configuring Nimbus With Autofac
Configuring Nimbus With Windsor
Configuring Nimbus With Ninject
Sending a Command on the Bus
Publishing an Event on the Bus
Request Response
Multicast Request Response
Multicast Request Response - take First
Large Message Support