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.
|
refreshAssignmentprotected 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)
SubscriptionSubscribe 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 Subscriptionconsumer - the Consumer to get.listener - the rebalance listener to include in the subscriptionpublic String getTopicsString()
getTopicsString in class SubscriptionCopyright © 2022 The Apache Software Foundation. All Rights Reserved.