Skip to content

How should event stream consumers handle out-of-order sequence numbers? #1552

Discussion options

You must be logged in to vote

If you're emitting events, you should work very hard to guarantee in-order and consistent sequence numbers for events.

Our services will just ignore any out of order event.

However, this is a good sign that something went wrong with the providing service.

Services may:

  • investigate the bad event and determine if they missed some blocks, perhaps falling back to a getRepo or getBlocks
  • restart the stream from the last in-order cursor (and bail if it happens again)

Persistent failures suggest a faulty service, and I would expect consumers to stop subscribing to them. Similar to publishing poorly signed commits

If the providing service is out of order because they reset their cursor (ie curso…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@DavidBuchanan314
Comment options

@snarfed
Comment options

@dholms
Comment options

Answer selected by snarfed
@dholms
Comment options

Comment options

You must be logged in to vote
1 reply
@dholms
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants