Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3854

Subsequent regex subscription calls fail

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0.1, 0.10.1.0
    • Component/s: consumer
    • Labels:
      None

      Description

      There are a couple of issues with regex subscription in the new consumer:

      Subsequent Subscriptions Fail

      When consecutive calls are made to new consumer's regex subscription, like below:

      consumer.subscribe(Pattern.compile("..."), listener);
      consumer.poll(0);
      
      consumer.subscribe(Pattern.compile("f.."), listener);
      consumer.poll(0);
      

      the second call fails with the following error:

      Exception in thread "main" java.lang.IllegalStateException: Subscription to topics, partitions and pattern are mutually exclusive
      	at org.apache.kafka.clients.consumer.internals.SubscriptionState.subscribe(SubscriptionState.java:175)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(KafkaConsumer.java:854)
      	...
      
      Subsequent Subscriptions Fail to Trigger a Subscription Change and Rebalance

      Even after the code is tweaked to get around the above issue, only the first call to regex subscription triggers an actual subscription and the subscription's rebalance listener. The reason is the regex subscription / poll does not directly call changeSubscription(...) in which needsPartitionAssignment is set and causes a rebalance. This method is called only during the first regex subscription / poll when coordinator is unknown and a client.poll call is made which eventually leads to a changeSubscription call. The subsequent call does not reach this point because the coordinator is already known.

      It seems due to the same reason, if a consumer is subscribed to a pattern, and later on a new topic is created that matches that pattern, the consumer does not become subscribed it.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/kafka/pull/1572
          Hide
          ewencp Ewen Cheslack-Postava added a comment -

          Issue resolved by pull request 1572
          https://github.com/apache/kafka/pull/1572

          Show
          ewencp Ewen Cheslack-Postava added a comment - Issue resolved by pull request 1572 https://github.com/apache/kafka/pull/1572
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 55423ce803081ead713c9b25655c9d859558177d
          Author: Vahid Hashemian <vahidhashemian@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.


          Show
          githubbot ASF GitHub Bot added a comment - 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 55423ce803081ead713c9b25655c9d859558177d Author: Vahid Hashemian <vahidhashemian@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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vahidhashemian closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1572
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 0860bd7691b87de33393b26373df752b0d2f934e
          Author: Vahid Hashemian <vahidhashemian@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.


          Show
          githubbot ASF GitHub Bot added a comment - 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 0860bd7691b87de33393b26373df752b0d2f934e Author: Vahid Hashemian <vahidhashemian@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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vahidhashemian closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1572
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 0860bd7691b87de33393b26373df752b0d2f934e
          Author: Vahid Hashemian <vahidhashemian@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.


          Show
          githubbot ASF GitHub Bot added a comment - 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 0860bd7691b87de33393b26373df752b0d2f934e Author: Vahid Hashemian <vahidhashemian@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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vahidhashemian closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1572
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 <vahidhashemian@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.


          Show
          githubbot ASF GitHub Bot added a comment - 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 <vahidhashemian@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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vahidhashemian closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1572
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 463345bf870f53a628c4b1b08400495a352736cb
          Author: Vahid Hashemian <vahidhashemian@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.


          Show
          githubbot ASF GitHub Bot added a comment - 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 463345bf870f53a628c4b1b08400495a352736cb Author: Vahid Hashemian <vahidhashemian@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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vahidhashemian closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user vahidhashemian closed the pull request at: https://github.com/apache/kafka/pull/1572
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user vahidhashemian opened 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 actually 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.

          Improved unit tests for regex subscriptions will be covered in KAFKA-3897.

          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 e9d10171b0ebbd13ac15d5f0059246ffbe249b37
          Author: Vahid Hashemian <vahidhashemian@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 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.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user vahidhashemian opened 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 actually 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. Improved unit tests for regex subscriptions will be covered in KAFKA-3897 . 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 e9d10171b0ebbd13ac15d5f0059246ffbe249b37 Author: Vahid Hashemian <vahidhashemian@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 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 .
          Hide
          bharatviswa Bharat Viswanadham added a comment -

          Hi vahid,
          Thats fine.
          I will have a look in to other Jiras to take-up.

          Show
          bharatviswa Bharat Viswanadham added a comment - Hi vahid, Thats fine. I will have a look in to other Jiras to take-up.
          Hide
          vahid Vahid Hashemian added a comment -

          Hi Bharat Viswanadham. I have already started working on it. I'll let you know if i decide not to pursue it. I hope that's okay.

          Show
          vahid Vahid Hashemian added a comment - Hi Bharat Viswanadham . I have already started working on it. I'll let you know if i decide not to pursue it. I hope that's okay.
          Hide
          bharatviswa Bharat Viswanadham added a comment -

          Hi Vahid,
          Can I take this PR, if you have not started working on this issue.

          Show
          bharatviswa Bharat Viswanadham added a comment - Hi Vahid, Can I take this PR, if you have not started working on this issue.

            People

            • Assignee:
              vahid Vahid Hashemian
              Reporter:
              vahid Vahid Hashemian
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development