You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a way to detect that a table status has changed (let's say from PartitionRecovering/PartitionPreparing to PartitionRunning).
How would you suggest to implement this? Aside from polling, is there an approach which can make intelligent use of the callbacks? Or perhaps we need a status change callback in goka?
The text was updated successfully, but these errors were encountered:
Hi gm42, as announced in issue #239 there will be a refactored version of goka.
In this new version we use a "Signal" which allows to check for a state with polling as well as block/wait until the signal is in a certain state.
This can be used to achieve what you need. The view implementation e.g. already provides a function for that: func (v *View) WaitRunning() <-chan struct{}
The channel will be closed as soon as the view is in state Running.
For the processor we currently only have func (g *Processor) Recovered() bool, but we can easily add the blocking version.
So my suggestion is that you try branch consumer-group or vendor tag v0.9.0-beta2 and let me know if you if such a function would be useful for your purposes. Or create a PR on that branch :)
Cheers
Closing this for no activity, also it is currently more or less supported via the View's ObserveStateChanges method, that passes the underlying partition table state.
I am looking for a way to detect that a table status has changed (let's say from
PartitionRecovering
/PartitionPreparing
toPartitionRunning
).How would you suggest to implement this? Aside from polling, is there an approach which can make intelligent use of the callbacks? Or perhaps we need a status change callback in
goka
?The text was updated successfully, but these errors were encountered: