A Mule application need to invoice an API hosted by an external system to initiate a process. The external API takes anywhere between one minute and 24 hours to compute its process.
Which implementation should be used to get response data from the external API after it completes processing?
31 comments · newest first
AN
Annabelle
7 months ago
C is interesting, but still not as reliable as D.
LO
Louis
7 months ago
B could work, but it feels inefficient to poll every minute.
TE
Tequila
7 months ago
True, but A would just hang for too long. Not practical.
KR
Krystina
7 months ago
But what if the external system fails to call back?
FR
Frankie
7 months ago
I agree, D seems efficient. No need to keep checking.
TA
Tabetha
8 months ago
I think option D is the best. It allows for real-time updates.
VE
Verdell
8 months ago
Not sure about D, what if they don't support callbacks?
MI
Miriam
8 months ago
B is like checking the fridge every minute to see if the food is ready. Seems a bit overkill.
CA
Carlene
9 months ago
Option D is the way to go. Who wants to wait 24 hours for a response? Not me!
DE
Dean
9 months ago
I'd go with C. Async scope should be able to handle the long processing time.
TE
Tesha
9 months ago
B is a bit of a hack, but it might work if the external system is reliable.
RO
Ronald
9 months ago
D seems like the best option to me. Handling the callback from the external system is the way to go.
BE
Bev
9 months ago
Option C looks good, but I'm not sure if it can handle the 24-hour processing time.
DE
Delsie
9 months ago
I feel like option C could work, but using Async might complicate things if we need to handle the response properly.
LA
Lashaunda
10 months ago
I'm a bit confused about option B; checking every minute seems inefficient, but maybe it's a valid approach?
DA
Davida
10 months ago
I remember practicing a question similar to this, and I think option D makes sense because it allows the external system to notify us when it's done.
BU
Buddy
10 months ago
I think option A might be too risky since the response time can be so long, but I'm not entirely sure.
GL
Glendora
10 months ago
I'm leaning towards option B - a scheduled check for the response every minute. That seems like a straightforward way to handle the uncertainty around the processing time.
AN
Anna
10 months ago
Option D seems interesting, but I'm not sure how that would work in practice. I'd need to understand more about how to expose and register that HTTP callback API.
VA
Val
10 months ago
Wait, can the external API really take up to 24 hours? That’s wild!
DU
Dudley
11 months ago
A would just time out, right? Not a good choice.
BE
Ben
11 months ago
I agree, D is definitely the way to go!
OD
Odelia
11 months ago
D seems like the best option for handling long wait times.
CY
Cyril
11 months ago
I think option C might be the way to go here. Using an async scope to invoke the API and wait for the response seems like it could handle the variable processing time well.
FR
France
11 months ago
Hmm, I'm a bit confused by the time range for the external API processing. That's going to be an important factor in deciding the best approach.
BR
Brynn
12 months ago
This looks like a tricky one. I'll need to think carefully about the different options and their implications.
TO
Tonette
6 months ago
Option C seems interesting too, using async could help manage the wait time.
DE
Derick
6 months ago
I feel like that could lead to unnecessary load on the system.
AL
Alana
6 months ago
True, then maybe option B could work, checking every minute.
CR
Cristen
6 months ago
But what if the external system doesn't support callbacks?
EL
Elinore
7 months ago
I think option D is the best choice. It allows for a callback.