We have a policy that loops through some requested data via the "Run Assertions for Each Item of ... as ..." construct, and for each iteration, the gateway kicks off a call to a downstream server.
In certain scenarios we can therefore find ourselves kicking off a number of calls to this downstream system, and according to the team responsible for this other system, in certain situations our calls are too close together, causing problems on their side.
They propose putting a 'sleep' into our policy, within the loop, to slow things down.
Would a shaping "Apply Rate Limit" assertion within the loop help with this? Is there another way?
For information: not all paths through the policy enter into this loop - we don't want to shape all calls to the policy, only those that loop