問題文
A price lookup has a primary provider and a backup provider. The backup should only be called when the primary fails. Which router expresses that?
選択肢
- The router that alternates between its routes on successive events, because alternating spreads the calls so that the backup is exercised regularly and is therefore known to be working when the primary actually fails.
- A Choice router with a condition on the response of the primary provider, evaluated after that first call has already returned its answer.
- The router that sends the event to every route in parallel and then keeps whichever answer arrives first from either of the two providers.
- The router that tries its routes in order and stops at the first one that completes without an error.