liftbridge-io / go-liftbridge

Go client for Liftbridge. https://github.com/liftbridge-io/liftbridge
Apache License 2.0
67 stars 18 forks source link

Add an option to allow resuming a paused partition when subscribing #75

Closed Jmgr closed 3 years ago

Jmgr commented 3 years ago

Liftbridge offers the option of pausing a stream (with some or all of its partitions) to reduce the amount of CPU and memory usage on idle streams. When that happens, every subscriber to a partition receives an error. Publishing to a paused partition will resume it, allowing it to function as before.

Our use-case includes a situation where we would like to read from a partition even if it is paused. It has to be resumed to do so, but we do not want to publish to it. This PR adds an option to the subscription request to allow it to resume a partition instead of returning an error.

tylertreat commented 3 years ago

lgtm, just need to update liftbridge-api dep.

Jmgr commented 3 years ago

The CI build seems to fail because the latest liftbridge-api has v2 RPCs, which triggers a failure go-liftbridge's v1 tests. Not sure what to do here. Should there be a v2 also for liftbridge-api?

tylertreat commented 3 years ago

Fixed in #77