AKHQ 中 Describe Topics Offsets 错误

Error for Describe Topics Offsets error in AKHQ

与 kafka 服务器的连接正常,但是当我尝试在 AKHQ 中加载主题时出现以下错误

2022-04-11 09:20:06,309 ERROR r-thread-6 o.a.c.ErrorController      Error for Describe Topics Offsets {}
java.lang.RuntimeException: Error for Describe Topics Offsets {}
      at org.akhq.utils.Logger.call(Logger.java:31)
      at org.akhq.modules.AbstractKafkaWrapper.describeTopicsOffsets(AbstractKafkaWrapper.java:121)
      at org.akhq.modules.$KafkaWrapperRequestScope$Definition$Exec.dispatch(Unknown Source)
      at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invoke(AbstractExecutableMethodsDefinition.java:351)
      at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:128)
      at org.akhq.modules.$KafkaWrapperRequestScope$Definition$Intercepted.describeTopicsOffsets(Unknown Source)
      at org.akhq.repositories.TopicRepository.findByName(TopicRepository.java:108)
      at org.akhq.repositories.TopicRepository.findByName(TopicRepository.java:94)
      at org.akhq.controllers.TopicController.data(TopicController.java:191)
      at org.akhq.controllers.$TopicController$Definition$Exec.dispatch(Unknown Source)
      at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invoke(AbstractExecutableMethodsDefinition.java:351)
      at io.micronaut.context.DefaultBeanContext.invoke(DefaultBeanContext.java:583)
      at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:303)
      at io.micronaut.web.router.RouteMatch.execute(RouteMatch.java:111)
      at io.micronaut.http.context.ServerRequestContext.with(ServerRequestContext.java:103)
      at io.micronaut.http.server.RouteExecutor.lambda$executeRoute(RouteExecutor.java:656)
      at reactor.core.publisher.FluxDeferContextual.subscribe(FluxDeferContextual.java:49)
      at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:62)
      at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194)
      at io.micronaut.reactive.reactor.instrument.ReactorInstrumentation.lambda$null[=10=](ReactorInstrumentation.java:62)
      at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
      at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
      at io.micrometer.core.instrument.composite.CompositeTimer.recordCallable(CompositeTimer.java:68)
      at io.micrometer.core.instrument.Timer.lambda$wrap(Timer.java:171)
      at io.micronaut.scheduling.instrument.InvocationInstrumenterWrappedCallable.call(InvocationInstrumenterWrappedCallable.java:53)
      at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.apache.kafka.common.errors.TimeoutException: Failed to get offsets by times in 1600ms

增加 AKHQ 中的 default.api.timeout.ms 值 application.yml 解决了问题

akhq:
  clients-defaults:
    consumer:
      properties:
        default.api.timeout.ms: 15000000