diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/events.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/events.adoc index 3d5f32ebac..bc4aefc6b8 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/events.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/events.adoc @@ -8,7 +8,7 @@ The following Spring application events are published by listener containers and * `ConsumerFailedToStartEvent`: published if no `ConsumerStartingEvent` is published within the `consumerStartTimeout` container property. This event might signal that the configured task executor has insufficient threads to support the containers it is used in and their concurrency. An error message is also logged when this condition occurs. -* `ListenerContainerIdleEvent`: published when no messages have been received in `idleInterval` (if configured). +* `ListenerContainerIdleEvent`: published when no messages have been received in `idleEventInterval` (if configured). * `ListenerContainerNoLongerIdleEvent`: published when a record is consumed after previously publishing a `ListenerContainerIdleEvent`. * `ListenerContainerPartitionIdleEvent`: published when no messages have been received from that partition in `idlePartitionEventInterval` (if configured). * `ListenerContainerPartitionNoLongerIdleEvent`: published when a record is consumed from a partition that has previously published a `ListenerContainerPartitionIdleEvent`. diff --git a/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionIdleEvent.java b/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionIdleEvent.java index 0b0249f117..7f94b6d6a9 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionIdleEvent.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionIdleEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 the original author or authors. + * Copyright 2016-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ * is configured to do so. * * @author Tomaz Fernandes + * @author Borahm Lee * @since 2.7 */ public class ListenerContainerPartitionIdleEvent extends KafkaEvent { @@ -108,7 +109,7 @@ public boolean isPaused() { @Override public String toString() { - return "ListenerContainerIdleEvent [idleTime=" + return "ListenerContainerPartitionIdleEvent [idleTime=" + ((float) this.idleTime / 1000) + "s, listenerId=" + this.listenerId // NOSONAR magic # + ", container=" + getSource() + ", paused=" + this.paused diff --git a/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionNoLongerIdleEvent.java b/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionNoLongerIdleEvent.java index 385b6a4c32..03332d166c 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionNoLongerIdleEvent.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionNoLongerIdleEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 the original author or authors. + * Copyright 2020-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ * idle events. * * @author Gary Russell + * @author Borahm Lee * @since 2.6.2 */ public class ListenerContainerPartitionNoLongerIdleEvent extends KafkaEvent { @@ -92,9 +93,9 @@ public String getListenerId() { @Override public String toString() { - return "ListenerContainerNoLongerIdleEvent [idleTime=" + return "ListenerContainerPartitionNoLongerIdleEvent [idleTime=" + ((float) this.idleTime / 1000) + "s, listenerId=" + this.listenerId // NOSONAR magic # + ", container=" + getSource() - + ", topicPartitions=" + this.topicPartition + "]"; + + ", topicPartition=" + this.topicPartition + "]"; } }