Priorities and Events
- 05 Dec 2022
-
DarkLight
-
PDF
Priorities and Events
- Updated on 05 Dec 2022
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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?