Hello Kent,
I would like to ask you something about API Callbacks.
I am building infrastructure with lots of API calls to PM Server and lots of Events called back from PM Server to my endpoint.
I am a little bit worry about fail requests (like server 500 codes), can you tell me something about callbacks implementation.
Tell me whether the callbacks operates asynchronously or anyone waiting in the queue and they are sent one a once?
API Efficiency
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API Efficiency
Callbacks are added to a queue and then a dedicated thread simply runs in a loop, pulling the oldest one from the queue and makes the http call. It waits for a response from your web server before repeating the loop. The queue is currently set to hold up to 500 callback requests. Any overflows are ignored.
-
- Posts: 13
- Joined: Mon Nov 16, 2015 9:54 am
Re: API Efficiency
Ok, what is the timeout, how much time do I have to process information?
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API Efficiency
I'm not setting a timeout value so it's using the default value for the component (Indy TIdHTTP). I'm not sure what that value is (can't find it in the docs) but I suspect it's at least a minute or two. If you're expecting to handle a large volume with some slow-executing code, you might want to just queue those up and return immediately and let a secondary process perform the actual work.RafalNiewinski wrote:Ok, what is the timeout, how much time do I have to process information?