in Education by
I have an elasticsearch kafka-connect connector consuming some topics. With the following configuration: { connection.url": "https://my-es-cluster:443", "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector", "key.converter": "org.apache.kafka.connect.storage.StringConverter", "key.ignore": "true", "topics": "topic1,topic2", ... } Can I add more topics to it while it's running? What will happen? What if I remove some topics from list and add them again later. I'd like to add a new topic3 here: { ... "topics": "topic1,topic2,topic3", ... } What is I remove topic2? Will other topics be re-consumed?: { ... "topics": "topic1,topic3", ... } JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Since you already have your kafka and kafka-connect running, you can use REST API of kafka-connect and check that yourself: https://docs.confluent.io/current/connect/references/restapi.html If you add a new topic (topic3), all messages currently in that topic (according to retention policy) will be consumed. PUT http://kafka-connect:8083/connectors/my-test-connector/config { ... "topics": "topic1,topic2,topic3", ... } Check status and config of this connector: GET http://kafka-connect:8083/connectors/my-test-connector If you want to disable some topic, just use PUT to update config for that connector. PUT http://kafka-connect:8083/connectors/my-test-connector/config { ... "topics": "topic1,topic3", ... } Nothing will change for topic1 and topic3. Just topic2 will not be consumed any more. But if you want to return it back, messages from topic2 will be consumed from the last committed offset, and not from beginning. For each consumer group last committed offset is stored, does not matter that you removed topic from the config for a while. For this case, the consumer group will be connect-my-test-connector. Even is you delete the connector (DELETE http://kafka-connect:8083/connectors/my-test-connector) and then create it again with the same name, the offset will be saved, and consumption will be continued from them point when you've deleted it. (mind the retention policy, it's usually 7 days).

Related questions

0 votes
    I have an elasticsearch kafka-connect connector consuming some topics. With the following configuration: { connection ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    I am using the Kafka Streams Processor API to construct a Kafka Streams application to retrieve messages from ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I am using the Kafka Streams Processor API to construct a Kafka Streams application to retrieve messages from ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    A _________ in Kafka reads streams of data from input topics, processes this data and produces continual streams of ... Stream processor (2)Consumer (3)Consumer group (4)Producer...
asked Jun 16, 2021 in Technology by JackTerrance
0 votes
    The _______ allows an application to act as a stream processor, consuming an input stream from one or more topics and ... API (2)Consumer API (3)Connector API (4)Producer API...
asked Jun 16, 2021 in Technology by JackTerrance
0 votes
    I'm trying to configure SSL for Kafka Connect REST API (2.11-2.1.0). The problem I tried two ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    I am trying to build a Rails 3.1 app in which users can preview individual pages of documents or ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 30, 2022 in Education by JackTerrance
0 votes
    Is there a way to control which buttons to display in a Jquery Dialog? Scenario: Perhaps there might be ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    Kafka is run as a cluster comprised of one or more servers each of which is called ___________....
asked Nov 16, 2022 in Education by JackTerrance
0 votes
    Kafka is run as a cluster comprised of one or more servers each of which is called (1)Leader (2)Replica (3)Broker (4)Main server...
asked Jun 16, 2021 in Technology by JackTerrance
0 votes
    how can i create a power point presentation on the topic AI FOR KIDS. wHAT ARE THE TOPICS THAT I SHOULD INCLUDE Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    4. Read the given conversation and select the infinitive : Dinesh : What is your aim in life? Anupama : I want ... pilot? Anupama : Yes Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    How is fly by wire system implemented in an aircraft? a) By using control rods and linkages connecting ... computers and actuators to control surfaces d) Artificial intelligence...
asked Dec 25, 2020 in Technology by JackTerrance
0 votes
    I want to connect to db on EC2 from my local machine, I am not able to do and have tried everything- I ... to connect to the database Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I has 1 issue with my project, i did subscribeToTopic(), has been successfully send 1 message to ' ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
...