Can I call same endpoints with the same Scatter-Gather?

Viewed 36

I know that http requests called in scatter gather are independent of each other. But what if all the endpoints are the same in the scatter-gather. Does the end-points also work independently??

In my Project I need to call the same endpoint more than once, yes I can pass the overall value as payload by calling only one time. But the system-layer is made to be generic and is not in my hands. Can I use scatter-gather for this multiple call of same endpoints?

2 Answers

I don't think scatter-gather is the right way to handle your requirement. What you can do is use for each / parallel for each and loop through all your sys api requests , store the responses and process it further.

Solution - 1: For good performance, Use batch processing and in the batch aggregator, you can set the size and process further.

Solution - 2: Use For each to do the sys call multiple times.

Related