public void subscribe(String topic) CompletableFuture<Ack> future = broker.subscribe(topic); try Ack ack = future.get(5000, TimeUnit.MILLISECONDS); catch (TimeoutException e) retrySubscribe(topic); // dangerous: no rate limit log.error("javxsubcom021645: min ack timeout");
dass: subscription: min-ack-ms: 5000 max-retries: 3 retry-backoff-ms: 1000 The “min fixed” refers to setting a (1 second) and a maximum retry cap (3 attempts), preventing retry storms. 4. Testing and Validation After deploying the fix, the team ran three validation steps: dass341 javxsubcom021645 min fixed
private final Semaphore retrySemaphore = new Semaphore(10); public void subscribe(String topic) CompletableFuture<Ack> future = broker.subscribe(topic); try Ack ack = future.get(5000, TimeUnit.MILLISECONDS); catch (TimeoutException e) if (retrySemaphore.tryAcquire()) scheduleRetry(topic, 1000); // exponential backoff else log.warn("dass341: max retries reached for javxsubcom"); public void subscribe(String topic) CompletableFuture<
Additionally, the team updated the application.yml : future = broker.subscribe(topic)