How do I "restart" watching Key-Value
I am connecting consul using a token that can be revoked and then I am starting to watch for changes using KVCache. When my consul token is expired I see "Error getting response from consul" in the log (coming from ConsulCache onFailure callback). I couldn't find a way to intercept this failure and re-connect to consul. Any idea?
You might have to use the lower level API to do this unfortunately. I don't have the time at the moment to update ConsulCache to support this. PRs welcome
Meanwhile I used "ConsulBookend" , I am checking the status code in the "post" method and do my reconnection there
@rickfast what lower level API exactly are you talking about?
Hello, we have the same problem of reloading the token when it expires. @dyeshurun can you please share the workaround with ConsulBookend you mentioned? I am finding it hard to intercept the 403 on callbacks and consequently stop all services caches and property caches without incurring in interrupted exceptions.