You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some REST APIs provides streamed content: the HTTP client connects once and stay connected and the server pushes content to the client as it becomes available chunk per chunk.
Currently, the http_poller plugin will wait for the whole content and never returns an event object:
private
def handle_success(queue, name, request, response, execution_time)
body = response.body # Wait for the whole content to be received
[...] # Decode and create the event object
end
It could be nice to support this type of long polling. I know the manticore library could handle that like this for a single connection:
private
def handle_success(queue, name, request, response, execution_time)
response.body do |chunk|
[...] # Decode and create the event object
end
end
(however it's not enough since the loop will be blocked indefinitely and the other requests will never be triggered)
The text was updated successfully, but these errors were encountered:
Some REST APIs provides streamed content: the HTTP client connects once and stay connected and the server pushes content to the client as it becomes available chunk per chunk.
Here is an example with Icinga: https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/#event-streams
This API will send the monitoring events as they occur.
Currently, the
http_poller
plugin will wait for the whole content and never returns an event object:It could be nice to support this type of long polling. I know the manticore library could handle that like this for a single connection:
(however it's not enough since the loop will be blocked indefinitely and the other requests will never be triggered)
The text was updated successfully, but these errors were encountered: