Skip to content

Commit e8f3577

Browse files
bky373spring-builds
authored andcommitted
Update toSting() methods in KafkaEvent subclasses (#3502)
* Fix `toSting()` methods in `KafkaEvent` subclasses * Fix typo in `events.adoc` (cherry picked from commit c6cf896)
1 parent 71450a6 commit e8f3577

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/events.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following Spring application events are published by listener containers and
88
* `ConsumerFailedToStartEvent`: published if no `ConsumerStartingEvent` is published within the `consumerStartTimeout` container property.
99
This event might signal that the configured task executor has insufficient threads to support the containers it is used in and their concurrency.
1010
An error message is also logged when this condition occurs.
11-
* `ListenerContainerIdleEvent`: published when no messages have been received in `idleInterval` (if configured).
11+
* `ListenerContainerIdleEvent`: published when no messages have been received in `idleEventInterval` (if configured).
1212
* `ListenerContainerNoLongerIdleEvent`: published when a record is consumed after previously publishing a `ListenerContainerIdleEvent`.
1313
* `ListenerContainerPartitionIdleEvent`: published when no messages have been received from that partition in `idlePartitionEventInterval` (if configured).
1414
* `ListenerContainerPartitionNoLongerIdleEvent`: published when a record is consumed from a partition that has previously published a `ListenerContainerPartitionIdleEvent`.

spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionIdleEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 the original author or authors.
2+
* Copyright 2016-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
* is configured to do so.
2525
*
2626
* @author Tomaz Fernandes
27+
* @author Borahm Lee
2728
* @since 2.7
2829
*/
2930
public class ListenerContainerPartitionIdleEvent extends KafkaEvent {
@@ -108,7 +109,7 @@ public boolean isPaused() {
108109

109110
@Override
110111
public String toString() {
111-
return "ListenerContainerIdleEvent [idleTime="
112+
return "ListenerContainerPartitionIdleEvent [idleTime="
112113
+ ((float) this.idleTime / 1000) + "s, listenerId=" + this.listenerId // NOSONAR magic #
113114
+ ", container=" + getSource()
114115
+ ", paused=" + this.paused

spring-kafka/src/main/java/org/springframework/kafka/event/ListenerContainerPartitionNoLongerIdleEvent.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 2020-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
* idle events.
2525
*
2626
* @author Gary Russell
27+
* @author Borahm Lee
2728
* @since 2.6.2
2829
*/
2930
public class ListenerContainerPartitionNoLongerIdleEvent extends KafkaEvent {
@@ -92,9 +93,9 @@ public String getListenerId() {
9293

9394
@Override
9495
public String toString() {
95-
return "ListenerContainerNoLongerIdleEvent [idleTime="
96+
return "ListenerContainerPartitionNoLongerIdleEvent [idleTime="
9697
+ ((float) this.idleTime / 1000) + "s, listenerId=" + this.listenerId // NOSONAR magic #
9798
+ ", container=" + getSource()
98-
+ ", topicPartitions=" + this.topicPartition + "]";
99+
+ ", topicPartition=" + this.topicPartition + "]";
99100
}
100101
}

0 commit comments

Comments
 (0)