Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
3.4.3
-
None
-
None
-
Unknown
Description
Hi there
I have integrated camel and consult to perform leader election when it come to polling. So far everything is working as expected. If I kill on of my pods then another pod becomes the leader. One thing I have noticed is that when I invalidate the session via Consul UI the camel service throws the following exception:
com.orbitz.consul.ConsulException: Consul request failed with status [404]: Session id 'da77a3a5-dbf8-49ab-9a46-f759b325895b' not foundcom.orbitz.consul.ConsulException: Consul request failed with status [404]: Session id 'da77a3a5-dbf8-49ab-9a46-f759b325895b' not found at com.orbitz.consul.util.Http.ensureResponseSuccessful(Http.java:61) at com.orbitz.consul.util.Http.extract(Http.java:33) at com.orbitz.consul.SessionClient.renewSession(SessionClient.java:80) at com.orbitz.consul.SessionClient.renewSession(SessionClient.java:69) at org.apache.camel.component.consul.cluster.ConsulClusterView$Watcher.watch(ConsulClusterView.java:279) at org.apache.camel.component.consul.cluster.ConsulClusterView$Watcher.onComplete(ConsulClusterView.java:252) at com.orbitz.consul.KeyValueClient$1.onComplete(KeyValueClient.java:167) at com.orbitz.consul.util.Http$1.onResponse(Http.java:80) at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
Which I would expect it to happen. But this continues until I have to manually kill the pod and restart the camel service.
Is there anyway to perform a retry X times and then acquire a new session? I couldn't see any configuration that would enable this, unless this is the expected behaviour.
Any help would be appreciated.