liftbridge-io / liftbridge

Lightweight, fault-tolerant message streams.
https://liftbridge.io
Apache License 2.0
2.57k stars 107 forks source link

StartPosition Glitch? #33

Closed andyl closed 6 years ago

andyl commented 6 years ago

The StartPosition behavior is not what I expect. What I see:

EARLIEST behaves like LATEST
NEW_ONLY behaves like EARLIEST
LATEST behaves like NEW_ONLY

Here's my code (from https://github.com/andyl/liftbridge_ruby/blob/master/lb_client) image

Here's the output image

Here's the Liftbridge debug log image

tylertreat commented 6 years ago

What commit of the server are you using? I recently changed the ordering of the StartPosition enum which might cause this problem.

tylertreat commented 6 years ago

Also, the server logs don't match your code. Note that the server logs show subscriptions with StartPosition: OFFSET, LATEST, NEW_ONLY, and OFFSET. Your code shows:

stream_base     = subscribe 
stream_earliest = subscribe(:EARLIEST)
stream_latest   = subscribe(:LATEST)
stream_new_only = subscribe(:NEW_ONLY)

So something is definitely off.

andyl commented 6 years ago

OK if you recently changed the StartPosition enum that would explain it. I'm using the go get liftbridge server - liftbridge --version -> 0.0.1. I'm using this spec: https://github.com/liftbridge-io/liftbridge-grpc/blob/master/api.proto

Thanks for your note - I'll keep my eye on this and adjust as things re-sync.

tylertreat commented 6 years ago

Yeah, sorry for that breaking change. I'm trying to keep breaking changes to a minimum but making necessary changes before a stable 1.0 release.

tylertreat commented 6 years ago

Closing this. Feel free to reopen if you are still hitting issues.