Package org.springframework.kafka.event
Class ConsumerPausedEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.kafka.event.KafkaEvent
org.springframework.kafka.event.ConsumerPausedEvent
- All Implemented Interfaces:
Serializable
An event published when a consumer is paused.
- Since:
- 2.1.5
- Author:
- Gary Russell
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionConsumerPausedEvent
(Object source, Object container, Collection<org.apache.kafka.common.TopicPartition> partitions) Construct an instance with the provided source and partitions.ConsumerPausedEvent
(Object source, Object container, Collection<org.apache.kafka.common.TopicPartition> partitions, String reason) Construct an instance with the provided source and partitions. -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.apache.kafka.common.TopicPartition>
Return the paused partitions.toString()
Methods inherited from class org.springframework.kafka.event.KafkaEvent
getContainer, getSource
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
ConsumerPausedEvent
public ConsumerPausedEvent(Object source, Object container, Collection<org.apache.kafka.common.TopicPartition> partitions) Construct an instance with the provided source and partitions.- Parameters:
source
- the container instance that generated the event.container
- the container or the parent container if the container is a child.partitions
- the partitions.- Since:
- 2.2.1
-
ConsumerPausedEvent
public ConsumerPausedEvent(Object source, Object container, Collection<org.apache.kafka.common.TopicPartition> partitions, String reason) Construct an instance with the provided source and partitions.- Parameters:
source
- the container instance that generated the event.container
- the container or the parent container if the container is a child.partitions
- the partitions.reason
- the reason for the pause.- Since:
- 2.8.9
-
-
Method Details
-
getPartitions
Return the paused partitions.- Returns:
- the partitions.
-
toString
- Overrides:
toString
in classEventObject
-