How to Get Past the 15 Minute Delay Limit in Amazon SQS

0

Getting Started with Scheduler API

We’ve bundled the API in a straightforward to exercise SDK. In this fragment we are able to help you accumulate a take a look at name up and working by delaying tasks to Amazon SQS in Node. The usage of the API entails 3 steps:

  1. Kind a Scheduler API chronicle
  2. Grant permissions
  3. Import the SDK and take a look at the resolution

1) Establishing a Scheduler API Narrative

First it is likely you’ll possibly well presumably also maintain to make a Scheduler API chronicle to construct up API keys. That it is likely you’ll possibly pause this by signing up on the principle net sites: www.schedulerapi.com and clicking “Worth Up”.

Image for post

Image for post

Homepage for Scheduler API

Otherwise it is likely you’ll possibly well budge straight to chronicle advent here: app.schedulerapi.com:

Image for post

Image for post

Signup Internet page for Scheduler API

Once your chronicle is created, the admin console will maintain a button to make your first API key. Click on the button to make the API key, as it is likely you’ll possibly need this within the take a look at name later.

Image for post

Image for post

2) Granting Permissions

The subsequent step is to make an IAM characteristic to characterize Scheduler API with “write” permissions to the queue you’ll need to schedule messages to. This is main or else the API can’t submit your scheduled messages. We lunge you by this in our blog submit here.

3) Importing the Scheduler SDK

Now that we’ve gotten the configuration done, we are able to construct up coding!

The suggested manner to set up the Scheduler API SDK is thru npm or Story.

npm:

npm set up schedulerapi-js

yarn:

yarn add schedulerapi-js

At this level, it is likely you’ll possibly well originate a name by adding this line of code to where you desire the task scheduled:

const s = unique Scheduler({ key:  SCHEDULER_API_KEY });const results = now stay unsleeping for s.scheduleSqs({

when: unique Date('2020-08-24 20: 13: 00'),

url: YOUR_SQS_QUEUE_URL,

body: ‘THE_BODY_OF_YOUR_SQS_MESSAGE’});
console.log(results);

A sample response appears to be like take care of this:

{

“identity”: “cLzxqmLKAEc2Tf2YzKRZW”,

“when”: “2020–08–24 20: 13: 00”,

“now”: “2020–08–24 20: 11: 35”,

“user”: “CkM2xwzjvxjGhWeiMFWy9s”

}

The calls to change(), execute(), and space() are identical and documented within the API docs below.

Documentation

That it is likely you’ll possibly well even see a full as an instance that it is likely you’ll possibly well pull in and take a look at at this github repo here — https://github.com/schedulerapi/schedulerapi-cra-typescript-example

You can also see the final API docs and NPM and PHP capabilities here:

NPM kit — https://www.npmjs.com/kit/schedulerapi-js

PHP SDK — https://packagist.org/capabilities/schedulerapi/schedulerapi-php

API Documentation — https://apidocs.schedulerapi.com/#schedulerapi

What’s subsequent?

Our subsequent areas of focal level involve:

  • Constructing a Scheduler API SDK for languages beyond upright Javascript and PHP.
  • Supporting varied messages queues beyond Amazon SQS (Kafka, ActiveMQ, Rabbit MQ, and others).

Contact

Whenever you happen to need Scheduler API for any varied exercise cases, we’d settle to listen to about it!

Contact us at recordsdata@schedulerapi.com for questions and requests. Be at liberty to head away comments below — we’d settle to listen to what you factor in. We guarantee a response to all inquiries inside of 24 hours. Happy hacking!

Read More

Leave A Reply

Your email address will not be published.