Skip to content

Subscribe topic with regex , When kafka added new topic, Consume will not receive new topic message #1223

@chunln

Description

@chunln

Description

Subscribe topic with regex , When kafka added new topic, Consume will not receive new topic message, Unless resubscribed.

How to reproduce

nuget:1.3.0
kafka:2.4.0
env:windows

Code:

           using (var consumer = new ConsumerBuilder<Ignore, string>(conf).Build())
           {
               consumer.Subscribe("^project.*");

               CancellationTokenSource cts = new CancellationTokenSource();
               Console.CancelKeyPress += (_, e) =>
               {
                   e.Cancel = true; 。
                   cts.Cancel();
               };

               try
               {
                   while (true)
                   {
                       try
                       {
                           var cr = consumer.Consume(cts.Token);
                       }
                       catch (ConsumeException e)
                       {
                       }
                   }
               }
               catch (OperationCanceledException e)
               {
                   consumer.Close();
               }
           }

Checklist

Please provide the following information:

  • A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
  • Confluent.Kafka nuget version.
  • Apache Kafka version.
  • Client configuration.
  • Operating system.
  • Provide logs (with "debug" : "..." as necessary in configuration).
  • Provide broker log excerpts.
  • Critical issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions