GitHub user vahidhashemian reopened a pull request:

    https://github.com/apache/kafka/pull/1572

    KAFKA-3854: Fix issues with new consumer's subsequent regex (pattern) 
subscriptions

    This patch fixes two issues:
    1. Subsequent regex subscriptions fail with the new consumer.
    2. Subsequent regex subscriptions would not immediately refresh metadata to 
change the subscription of the new consumer and trigger a rebalance.
    
    The final note on the JIRA stating that a later created topic that matches 
a consumer's subscription pattern would not be assigned to the consumer upon 
creation seems to be as designed. A repeat 
    `subscribe()` to the same pattern or some wait time until the next 
automatic metadata refresh would handle that case.
    
    An integration test was also added to verify these issues are fixed with 
this PR.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vahidhashemian/kafka KAFKA-3854

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/1572.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1572
    
----
commit 5fb472a48a0231aece798d601c3427bd058fc078
Author: Vahid Hashemian <vahidhashem...@us.ibm.com>
Date:   2016-06-16T21:19:32Z

    KAFKA-3854: Fix issues with new consumer's subsequent regex (pattern) 
subscriptions
    
    This patch fixes two issues:
    1. Subsequent regex subscriptions fail with the new consumer.
    2. Subsequent regex subscriptions would not actually refresh metadata and 
change the subscription of the new consumer nor they would trigger a rebalance.
    
    The final note on the JIRA stating that a later created topic that matches 
a consumer's subscription pattern would not be assigned to the consumer upon 
creation seems to be as designed. A repeat subscribe() to the same pattern 
would be needed to handle that case.
    Unit tests for regex subscriptions will be handled in KAFKA-3897.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to