public override StreamTask CreateTask(IConsumer <byte[], byte[]> consumer, TaskId id, TopicPartition partition) { log.Debug($"Created task {id} with assigned partition {partition}"); return(new StreamTask( threadId, id, partition, builder.BuildTopology(partition.Topic), consumer, configuration, kafkaSupplier, producer)); }
public override StreamTask CreateTask(IConsumer <byte[], byte[]> consumer, TaskId id, IEnumerable <TopicPartition> partitions) { log.Debug($"Created task {id} with assigned partition {string.Join(",", partitions)}"); return(new StreamTask( threadId, id, partitions, builder.BuildTopology(id.Id), consumer, configuration, kafkaSupplier, producer)); }
public override StreamTask CreateTask(IConsumer <byte[], byte[]> consumer, TaskId id, IEnumerable <TopicPartition> partitions) { log.LogDebug($"Created task {id} with assigned partition {string.Join(",", partitions)}"); var task = new StreamTask( threadId, id, partitions, builder.BuildTopology(id.Id), consumer, configuration, kafkaSupplier, producer, storeChangelogReader, streamMetricsRegistry); createTaskSensor.Record(); return(task); }
// Use for testing (TaskSynchronousTopologyDriver & ClusterInMemoryTopologyDriver) to create source topics before repartition & changelog topcis internal InternalTopicManagerUtils CreateSourceTopics(InternalTopologyBuilder builder, IKafkaSupplier supplier) { var adminConfig = new AdminClientConfig(); adminConfig.ClientId = "internal-admin-create-soure-topic"; var sourceTopics = builder.BuildTopology().GetSourceTopics().ToList(); var globalTopo = builder.BuildGlobalStateTopology(); if (globalTopo != null) { sourceTopics.AddRange(globalTopo.StoresToTopics.Values); } supplier .GetAdmin(adminConfig) .CreateTopicsAsync(sourceTopics.Select(s => new TopicSpecification() { Name = s, NumPartitions = -1 })).GetAwaiter().GetResult(); return(this); }