Priorities and Events
  • 05 Dec 2022
  • Dark
    Light
  • PDF

Priorities and Events

  • Dark
    Light
  • PDF

Article summary

Priority and event are both specific to throttling.

Priority is a way to prioritize items in the throttle queue.

  • The priority must correspond to the value defined in the priorities array in the adapter properties.
  • The adapter will queue the request based on the percent value for the matching priority. Zero percent (0%) indicates the request is at the front of the queue and 100% means it is at the end of the queue.

Event tells the adapter how to return the result when the caller has decided not to wait for the response.

  • The adapter will trigger the event when the response is ready so that the caller can then know the result is ready.

Example: Priority and event.

const reqObj =
  payload: { garbage: 'need since post' },
  uriPathVars: [groupId, deviceId],
  uriQuery: { name: 'anyname' },
  uriOptions: { page: 2 },
  addlHeaders: { audit: 'turnOn' },
  authData: { domain: 'abc' },
  callProperties: {
    stub: true,
    request: {
      attempt_timeout = 60000
    }
  }, 
  filter: '[*name=abc]',
  priority: 1,
  event: 'giveMeMyData'
};

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.