Forum Academy Marketplace Showcase Pricing Features

How to implement a queue for external API calls?

I need to be limit calls to an external API to say 5 concurrent calls. (via API Connector plugin). When it hits the limit, it returns an error JSON. So I need to either set up a sequential queue or retry the call until it works.

I’m thinking of implementing a Queue data type :

  • Running (yes / no)
  • ID
  • Input
  • Output

Do you think this will work? Has anyone done something similar? Thanks!

Or is it easier to keep retrying the API call until the limit is eased? Not sure how to do this though…