Skip to content

Commit

Permalink
Update toSting() methods in KafkaEvent subclasses (#3502)
Browse files Browse the repository at this point in the history
* Fix `toSting()` methods in `KafkaEvent` subclasses

* Fix typo in `events.adoc`

 **Auto-cherry-pick to `3.2.x` & `3.1.x`**
  • Loading branch information
bky373 authored Sep 16, 2024
1 parent 074ad1c commit c6cf896
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -24,6 +24,7 @@
* is configured to do so.
*
* @author Tomaz Fernandes
* @author Borahm Lee
* @since 2.7
*/
public class ListenerContainerPartitionIdleEvent extends KafkaEvent {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -24,6 +24,7 @@
* idle events.
*
* @author Gary Russell
* @author Borahm Lee
* @since 2.6.2
*/
public class ListenerContainerPartitionNoLongerIdleEvent extends KafkaEvent {
Expand Down Expand Up @@ -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 + "]";
}
}

0 comments on commit c6cf896

Please sign in to comment.