IBMStreams / streamsx.kafka

Repository for integration with Apache Kafka
https://ibmstreams.github.io/streamsx.kafka/
Apache License 2.0
13 stars 9 forks source link

Support for subscription with patterns #144

Closed ghost closed 5 years ago

ghost commented 5 years ago

The KafkaConsumer shall be able to use a pattern to subscribe to matching topics. This would enable applications that optionally require a subscription to one or more topics. The Kafka consumer API supports subscribe with a regular expression.

public void subscribe(java.util.regex.Pattern pattern,
                      ConsumerRebalanceListener listener)

Subscribe to all topics matching specified pattern to get dynamically assigned partitions. The pattern matching will be done periodically against topic existing at the time of check.

As part of group management, the consumer will keep track of the list of consumers that belong to a particular group and will trigger a rebalance operation if one of the following events trigger -

- Number of partitions change for any of the subscribed list of topics
- Topic is created or deleted
- An existing member of the consumer group dies
- A new member is added to an existing consumer group via the join API 

The feature would imply group management and must be usable when in consistent region and when not.

ghost commented 5 years ago

I will add

ghost commented 5 years ago

implemented in v1.8.0