ManualPartitionSubscription
with PatternTopicFilter
instead@Deprecated public class PatternSubscription extends Subscription
Subscribe to all topics that match a given pattern.
Constructor and Description |
---|
PatternSubscription(Pattern pattern)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getTopicsString()
Deprecated.
|
<K,V> void |
subscribe(org.apache.kafka.clients.consumer.KafkaConsumer<K,V> consumer,
org.apache.kafka.clients.consumer.ConsumerRebalanceListener listener,
TopologyContext unused)
Deprecated.
Subscribe the KafkaConsumer to the proper topics.
|
refreshAssignment
protected final Pattern pattern
public PatternSubscription(Pattern pattern)
public <K,V> void subscribe(org.apache.kafka.clients.consumer.KafkaConsumer<K,V> consumer, org.apache.kafka.clients.consumer.ConsumerRebalanceListener listener, TopologyContext unused)
Subscription
Subscribe the KafkaConsumer to the proper topics. Implementations must ensure that a given topic partition is always assigned to the same spout task. Adding and removing partitions as necessary is fine, but partitions must not move from one task to another. This constraint is only important for use with the Trident spout.
subscribe
in class Subscription
consumer
- the Consumer to get.listener
- the rebalance listener to include in the subscriptionpublic String getTopicsString()
getTopicsString
in class Subscription
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.