firehoseio / firehose

Build realtime Ruby web applications. Created by the fine folks at Poll Everywhere.
http://firehose.io/
MIT License
727 stars 72 forks source link

Add dropped message detection to Firehose clients #52

Closed bradgessler closed 8 years ago

bradgessler commented 8 years ago

The client can detect a gap in the last_message_sequence and fire a "messagedropped" callback. This callback could be used by end users to send dropped message telemetry to a metrics server or have the client fill in the gaps by accessing their web servers.

bradgessler commented 8 years ago

Change the client to call the dropped callback per message. e.g.:

new Firehose.Consumer({
  dropped: function(sequence){
    console.log(sequence + "was dropped");
  }
})
bakkdoor commented 8 years ago

Merged into master. Closing.

bakkdoor commented 8 years ago

That code is buggy and I reverted that commit until I can figure out what's causing issues. I'll probably also need to rewrite those JS client tests, they didn't catch the error and I think they aren't working as intended.

bradgessler commented 8 years ago

Closing this issue here since we moved the JS to a different repo. Continue at https://github.com/firehoseio/js_client/issues/3.