Wait after fetch exception on topic 03/122403/2
authorJim Hahn <jrh3@att.com>
Thu, 1 Jul 2021 15:41:00 +0000 (11:41 -0400)
committerJim Hahn <jrh3@att.com>
Fri, 2 Jul 2021 12:53:40 +0000 (08:53 -0400)
commit67820c17aba5a212ba00ef33c36de2540cdb303e
tree0b0fafa0fc2daa8bee8c20c7e1a27b64ee7424c3
parent749ee9da67d32ca8e33169607fcd7139632b29e7
Wait after fetch exception on topic

When dmaap is inaccessible for some reason, the topic source frequently
enters a fast fail loop, rapidly filling up the log.  Modified the code
to wait the configured fetchTimeout when this occurs.

With any luck, this will also fix the sporadic kubernetes crash-fail
loops sometimes seen with the xacml-pdp pod.

Modified to limit how long it will sleep after a failure, regardless of
the fetchTimeout that was specified.

Issue-ID: POLICY-3457
Change-Id: I88e360fb1d31197b46f4959e5ea0ea2d741ad25c
Signed-off-by: Jim Hahn <jrh3@att.com>
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java
policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumerTest.java