Open mattes opened 9 years ago
Hi, there is not, that i'm aware of, but probably a good addition to the already available ones.
On Sat, 8 Aug 2015 08:02 Matthias Kadenbach notifications@github.com wrote:
Is there an output plugin that facilitates Server-Sent Events (SSE) http://www.html5rocks.com/en/tutorials/eventsource/basics/ already?
— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash/issues/3709.
Would we buffer events in the plugin and wait until a Browser connects via SSE to fetch the events?
Hi, I'm not sure I understand what you mean, could you explain in more detail?
/cheerd
On Thu, 13 Aug 2015 21:23 Matthias Kadenbach notifications@github.com wrote:
Would we buffer events in the plugin and wait until a Browser connects via SSE to fetch the events?
— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash/issues/3709#issuecomment-130810896.
@mattes good question! if we don't buffer, then back pressure will be applied after the 20th event (internal queues are 20 elements). I am guessing we could make that configurable and either simply immediately discard events if there is no client connected, or buffer some, up to a limit and discard...
If you want to buffer events, you could try Stud::Buffer [1] the same way as the elasticsearch output does [2].
/cheers
[1] https://github.com/jordansissel/ruby-stud/blob/master/lib/stud/buffer.rb [2] https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/master/lib/logstash/outputs/elasticsearch.rb#L67
Is there an output plugin that facilitates Server-Sent Events (SSE) already?