From 147e8de96ba4fe6245e1c77ea02ab13766566dd3 Mon Sep 17 00:00:00 2001 From: "Willimann Marco, I231 extern" Date: Thu, 13 Apr 2023 23:20:31 +0200 Subject: [PATCH] feat: upgrade to Confluent.Kafka 2.1.0 --- .../Silverback.Integration.Kafka.SchemaRegistry.csproj | 4 ++-- .../Broker/Kafka/Mocks/MockedConfluentAdminClient.cs | 2 ++ .../Messaging/Broker/Kafka/Mocks/MockedConfluentConsumer.cs | 4 ++++ .../Messaging/Broker/Kafka/Mocks/MockedConfluentProducer.cs | 2 ++ .../Silverback.Integration.Kafka.csproj | 2 +- .../Silverback.Tools.KafkaConfigClassGenerator.csproj | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Silverback.Integration.Kafka.SchemaRegistry/Silverback.Integration.Kafka.SchemaRegistry.csproj b/src/Silverback.Integration.Kafka.SchemaRegistry/Silverback.Integration.Kafka.SchemaRegistry.csproj index af9a591a0..cfa07881c 100644 --- a/src/Silverback.Integration.Kafka.SchemaRegistry/Silverback.Integration.Kafka.SchemaRegistry.csproj +++ b/src/Silverback.Integration.Kafka.SchemaRegistry/Silverback.Integration.Kafka.SchemaRegistry.csproj @@ -31,8 +31,8 @@ This package adds the support for Apache Avro and the schema registry on top of - - + + diff --git a/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentAdminClient.cs b/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentAdminClient.cs index d65ca5b73..931ef66ad 100644 --- a/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentAdminClient.cs +++ b/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentAdminClient.cs @@ -25,6 +25,8 @@ public MockedConfluentAdminClient(ClientConfig config, IMockedKafkaOptions optio public Handle Handle { get; } = new(); + public void SetSaslCredentials(string username, string password) => throw new NotSupportedException(); + public int AddBrokers(string brokers) => throw new NotSupportedException(); public List ListGroups(TimeSpan timeout) => throw new NotSupportedException(); diff --git a/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentConsumer.cs b/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentConsumer.cs index 39f408c3e..e03ddeda2 100644 --- a/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentConsumer.cs +++ b/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentConsumer.cs @@ -96,6 +96,8 @@ public MockedConfluentConsumer( internal Action, CommittedOffsets>? OffsetsCommittedHandler { get; set; } + public void SetSaslCredentials(string username, string password) => throw new NotSupportedException(); + public int AddBrokers(string brokers) => throw new NotSupportedException(); public ConsumeResult Consume(int millisecondsTimeout) => @@ -258,6 +260,8 @@ public List Committed( public Offset Position(TopicPartition partition) => throw new NotSupportedException(); + public TopicPartitionOffset PositionTopicPartitionOffset(TopicPartition partition) => throw new NotSupportedException(); + public List OffsetsForTimes( IEnumerable timestampsToSearch, TimeSpan timeout) => diff --git a/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentProducer.cs b/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentProducer.cs index 949f55779..3b52e94b1 100644 --- a/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentProducer.cs +++ b/src/Silverback.Integration.Kafka.Testing/Messaging/Broker/Kafka/Mocks/MockedConfluentProducer.cs @@ -46,6 +46,8 @@ public MockedConfluentProducer( internal Action, string>? StatisticsHandler { get; set; } + public void SetSaslCredentials(string username, string password) => throw new NotSupportedException(); + public int AddBrokers(string brokers) => throw new NotSupportedException(); public Task> ProduceAsync( diff --git a/src/Silverback.Integration.Kafka/Silverback.Integration.Kafka.csproj b/src/Silverback.Integration.Kafka/Silverback.Integration.Kafka.csproj index cba3f1e38..8bb976044 100644 --- a/src/Silverback.Integration.Kafka/Silverback.Integration.Kafka.csproj +++ b/src/Silverback.Integration.Kafka/Silverback.Integration.Kafka.csproj @@ -31,7 +31,7 @@ This package contains an implementation of Silverback.Integration for the popula - + diff --git a/tools/Silverback.Tools.KafkaConfigClassGenerator/Silverback.Tools.KafkaConfigClassGenerator.csproj b/tools/Silverback.Tools.KafkaConfigClassGenerator/Silverback.Tools.KafkaConfigClassGenerator.csproj index edcd7fdeb..7691615fb 100644 --- a/tools/Silverback.Tools.KafkaConfigClassGenerator/Silverback.Tools.KafkaConfigClassGenerator.csproj +++ b/tools/Silverback.Tools.KafkaConfigClassGenerator/Silverback.Tools.KafkaConfigClassGenerator.csproj @@ -7,7 +7,7 @@ - + lib/netcoreapp2.1/*.xml