public interface ConsumerRegistry
| Modifier and Type | Method and Description |
|---|---|
<K,V> Consumer<K,V> |
getConsumer(java.lang.String id)
Returns a managed Consumer.
|
java.util.Set<TopicPartition> |
getConsumerAssignment(java.lang.String id)
Returns a managed Consumer's assignment info.
|
java.util.Set<java.lang.String> |
getConsumerIds()
The IDs of the available consumers.
|
java.util.Set<java.lang.String> |
getConsumerSubscription(java.lang.String id)
Returns a managed Consumer's subscriptions.
|
boolean |
isPaused(java.lang.String id)
Is the consumer with the given ID paused.
|
boolean |
isPaused(java.lang.String id,
java.util.Collection<TopicPartition> topicPartitions)
Is the consumer with the given ID paused to consume from the given topic partitions.
|
void |
pause(java.lang.String id)
Pause the consumer for the given ID.
|
void |
pause(java.lang.String id,
java.util.Collection<TopicPartition> topicPartitions)
Pause the consumer for the given ID to consume from the given topic partitions.
|
void |
resume(java.lang.String id)
Resume the consumer for the given ID.
|
void |
resume(java.lang.String id,
java.util.Collection<TopicPartition> topicPartitions)
Resume the consumer for the given ID to consume from the given topic partitions.
|
@NonNull <K,V> Consumer<K,V> getConsumer(@NonNull java.lang.String id)
K - The key generic typeV - The value generic typeid - The id of the producer.java.lang.IllegalArgumentException - If no consumer exists for the given ID@NonNull
java.util.Set<java.lang.String> getConsumerSubscription(@NonNull
java.lang.String id)
id - The id of the producer.java.lang.IllegalArgumentException - If no consumer exists for the given ID@NonNull java.util.Set<TopicPartition> getConsumerAssignment(@NonNull java.lang.String id)
id - The id of the producer.java.lang.IllegalArgumentException - If no consumer exists for the given ID@NonNull java.util.Set<java.lang.String> getConsumerIds()
boolean isPaused(@NonNull
java.lang.String id)
id - the consumers idboolean isPaused(@NonNull
java.lang.String id,
@NonNull
java.util.Collection<TopicPartition> topicPartitions)
id - the consumers idtopicPartitions - The topic partitions to check if pausedvoid pause(@NonNull
java.lang.String id)
isPaused(String) method to
establish when the consumer has actually been paused.id - The id of the consumervoid pause(@NonNull
java.lang.String id,
@NonNull
java.util.Collection<TopicPartition> topicPartitions)
isPaused(String, Collection) method to
establish when the consumer has actually been paused for the topic partitions.id - The id of the consumertopicPartitions - The topic partitions to pause consuming fromvoid resume(@NonNull
java.lang.String id)
isPaused(String) method to
establish when the consumer has actually been resumed.id - The id of the consumervoid resume(@NonNull
java.lang.String id,
@NonNull
java.util.Collection<TopicPartition> topicPartitions)
isPaused(String, Collection) method to
establish when the consumer has actually been resumed to consume from the given topic partitions.id - The id of the consumertopicPartitions - The topic partitions to pause consuming from