ManualPartitionSubscription
with NamedTopicFilter
instead@Deprecated public class NamedSubscription extends Subscription
Subscribe to all topics that follow a given list of values.
Modifier and Type | Field and Description |
---|---|
protected Collection<String> |
topics
Deprecated.
|
Constructor and Description |
---|
NamedSubscription(Collection<String> topics)
Deprecated.
|
NamedSubscription(String... topics)
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 Collection<String> topics
public NamedSubscription(Collection<String> topics)
public NamedSubscription(String... topics)
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.