kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Cardoso <pedro.card...@feedzai.com>
Subject Incremental topic subscription
Date Wed, 04 Mar 2020 11:13:04 GMT

Does the KafkaConsumer subscribe methods allow for incremental topic

By incremental I mean that only the added and removed topics and
subscribed/unsubscribes respectively and the other topics are not
unsubscribed and subscribed back.

>From the javadoc API on the subscribe method with a list of topics
it is mentioned that topic subscription is not incremental. Does the same
apply for pattern-based subscriptions

As an example, take the following scenario:
Step 1: consumer.subscribe(list("A","B","C"))

// Now we subscribe to topic D and no longer care about C
Step 2: consumer.subscribe(list("A","B","D"))

What happens in this scenario with pattern-based subscription?
Are all topics from Step 1 unsubscribed and then all Step 2 topics are

Thank you and best regards,

Pedro Cardoso

Research Data Engineer


[image: Follow Feedzai on Facebook.] <https://www.facebook.com/Feedzai/>[image:
Follow Feedzai on Twitter!] <https://twitter.com/feedzai>[image: Connect
with Feedzai on LinkedIn!] <https://www.linkedin.com/company/feedzai/>
<https://feedzai.com/>[image: Feedzai in Forbes Fintech 50!]

The content of this email is confidential and 
intended for the recipient 
specified in message only. It is strictly 
prohibited to share any part of 
this message with any third party, 
without a written consent of the 
sender. If you received this message by
 mistake, please reply to this 
message and follow with its deletion, so 
that we can ensure such a mistake 
does not occur in the future.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message