diff --git a/KafkaFlow.sln b/KafkaFlow.sln
index a591122dc..b75b9aadb 100644
--- a/KafkaFlow.sln
+++ b/KafkaFlow.sln
@@ -96,6 +96,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KafkaFlow.Sample.OpenTelemetry", "samples\KafkaFlow.Sample.OpenTelemetry\KafkaFlow.Sample.OpenTelemetry.csproj", "{E9E8B374-4165-45F2-8DF5-F141E141AC1D}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KafkaFlow.Sample.WildcardConsumer", "samples\KafkaFlow.Sample.WildcardConsumer\KafkaFlow.Sample.WildcardConsumer.csproj", "{8F6CDF12-5316-4AAF-A1F1-264337585698}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -222,6 +224,10 @@ Global
{E9E8B374-4165-45F2-8DF5-F141E141AC1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9E8B374-4165-45F2-8DF5-F141E141AC1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9E8B374-4165-45F2-8DF5-F141E141AC1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8F6CDF12-5316-4AAF-A1F1-264337585698}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F6CDF12-5316-4AAF-A1F1-264337585698}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8F6CDF12-5316-4AAF-A1F1-264337585698}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8F6CDF12-5316-4AAF-A1F1-264337585698}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -265,6 +271,7 @@ Global
{1755E8DB-970C-4A24-8B7C-A2BEC1410BEE} = {7A9B997B-DAAC-4004-94F3-32F6B88E0068}
{80080C1D-579E-4AB2-935D-5CFFC51843D8} = {7A9B997B-DAAC-4004-94F3-32F6B88E0068}
{E9E8B374-4165-45F2-8DF5-F141E141AC1D} = {303AE78F-6C96-4DF4-AC89-5C4FD53AFF0B}
+ {8F6CDF12-5316-4AAF-A1F1-264337585698} = {303AE78F-6C96-4DF4-AC89-5C4FD53AFF0B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AE955B5-16B0-41CF-9F12-66D15B3DD1AB}
diff --git a/docker-compose.yml b/docker-compose.yml
index 8764803ce..277010328 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,7 +2,7 @@ version: '3'
services:
zookeeper:
- image: confluentinc/cp-zookeeper:7.2.1
+ image: confluentinc/cp-zookeeper:7.7.1
hostname: zookeeper
container_name: zookeeper
ports:
@@ -10,9 +10,9 @@ services:
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
-
+
broker:
- image: confluentinc/cp-server:7.2.1
+ image: confluentinc/cp-server:7.7.1
hostname: broker
container_name: broker
depends_on:
@@ -44,9 +44,9 @@ services:
interval: 10s
timeout: 5s
retries: 5
-
+
schema-registry:
- image: confluentinc/cp-schema-registry:7.2.1
+ image: confluentinc/cp-schema-registry:7.7.1
hostname: schema-registry
container_name: schema-registry
depends_on:
@@ -58,10 +58,10 @@ services:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:29092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
-
+
kafka-tools:
- image: confluentinc/cp-kafka:7.0.5
+ image: confluentinc/cp-kafka:7.7.1
hostname: kafka
container_name: kafka
command: ["tail", "-f", "/dev/null"]
- network_mode: "host"
\ No newline at end of file
+ network_mode: "host"
diff --git a/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj b/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj
index 6336785ab..7ffd3428d 100644
--- a/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj
+++ b/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
false
false
true
@@ -17,7 +17,7 @@
-
+
diff --git a/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj b/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj
index 3f2204ac3..dc8814dd7 100644
--- a/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj
+++ b/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
false
false
true
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj b/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj
index 80eed6be1..c71b81066 100644
--- a/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj
+++ b/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
false
true
diff --git a/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj b/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj
index 20946db23..b14467b7f 100644
--- a/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj
+++ b/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj
@@ -2,10 +2,9 @@
Exe
- net6.0
+ net8.0
false
false
- 10
true
@@ -18,7 +17,7 @@
-
+
diff --git a/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj b/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj
index b2400f211..6cb1dbea8 100644
--- a/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj
+++ b/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
false
false
true
@@ -10,11 +10,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj b/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj
index 7a55c9fd7..af48b3a1b 100644
--- a/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj
+++ b/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
enable
false
@@ -18,7 +18,7 @@
-
+
diff --git a/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj b/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj
index ddef38718..88f2d5cc3 100644
--- a/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj
+++ b/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
false
false
KafkaFlow.Sample.SchemaRegistry
@@ -28,7 +28,7 @@
-
+
diff --git a/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj b/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj
index bf85308d2..3d4f9e5a3 100644
--- a/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj
+++ b/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
false
true
enable
@@ -25,9 +25,9 @@
-
-
-
+
+
+
diff --git a/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj b/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj
index 05d9e4f29..416efc3ca 100644
--- a/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj
+++ b/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
enable
enable
@@ -10,18 +10,15 @@
-
-
-
-
+
diff --git a/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs b/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs
index 32d13df22..e37a712d0 100644
--- a/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs
+++ b/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs
@@ -20,7 +20,7 @@
producerName, _ => { })
.AddConsumer(
consumer => consumer
- .Topic($"^{topicPrefix}*") // Any topic starting with `random-topic-*`
+ .Topic($"^{topicPrefix}*") // Any topic starting with `random-topic-*`
.WithGroupId("random-topic-handler")
.WithBufferSize(5)
.WithWorkersCount(3)
@@ -67,4 +67,4 @@ await producer.ProduceAsync(
Guid.NewGuid().ToString(),
Encoding.UTF8.GetBytes(
$"Message to {input}: {Guid.NewGuid()}"));
-}
\ No newline at end of file
+}
diff --git a/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj b/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj
index 89cfb73ca..455292e5a 100644
--- a/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj
+++ b/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
false
false
true
@@ -24,7 +24,7 @@
-
+
diff --git a/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs b/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs
index 3b4177c05..9b0ee6e37 100644
--- a/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs
+++ b/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs
@@ -1,12 +1,11 @@
-namespace KafkaFlow.Configuration
+namespace KafkaFlow.Configuration;
+
+/// SaslOauthbearerMethod enum values
+public enum SaslOauthbearerMethod
{
- /// SaslOauthbearerMethod enum values
- public enum SaslOauthbearerMethod
- {
- /// Default
- Default,
+ /// Default
+ Default,
- /// Oidc
- Oidc,
- }
+ /// Oidc
+ Oidc,
}
diff --git a/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj b/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj
index 283ef9c6b..9d72303b0 100644
--- a/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj
+++ b/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj
@@ -8,8 +8,9 @@
-
-
+
+
+
diff --git a/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj b/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj
index ae071e278..104bcf0dc 100644
--- a/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj
+++ b/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
true
Latest
true
@@ -23,8 +23,9 @@
-
+
+
diff --git a/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj b/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj
index 44b6cf74e..74a0e5d6d 100644
--- a/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj
+++ b/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
Library
KafkaFlow.Admin.WebApi
Allows KafkaFlow to use the Admin Web API
@@ -15,6 +15,7 @@
+
diff --git a/src/KafkaFlow.Admin/KafkaFlow.Admin.csproj b/src/KafkaFlow.Admin/KafkaFlow.Admin.csproj
index cb8c11c06..565337363 100644
--- a/src/KafkaFlow.Admin/KafkaFlow.Admin.csproj
+++ b/src/KafkaFlow.Admin/KafkaFlow.Admin.csproj
@@ -12,4 +12,8 @@
+
+
+
+
diff --git a/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj b/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj
index 69586386a..067b61b47 100644
--- a/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj
+++ b/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj
@@ -9,4 +9,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj b/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj
index 0533b40c3..4038568ec 100644
--- a/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj
+++ b/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj
@@ -13,7 +13,8 @@
-
+
+
diff --git a/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj b/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj
index 44287854f..7d9392583 100644
--- a/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj
+++ b/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj
@@ -10,7 +10,8 @@
-
+
+
diff --git a/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj b/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj
index a2ef2b168..f1925a49f 100644
--- a/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj
+++ b/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj
@@ -12,8 +12,9 @@
-
-
+
+
+
diff --git a/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj b/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj
index ebd8ab6a0..8ab9da114 100644
--- a/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj
+++ b/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj
@@ -13,7 +13,8 @@
-
+
+
diff --git a/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs b/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs
index 5a119dbbf..8fb371ce3 100644
--- a/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs
+++ b/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs
@@ -1,9 +1,6 @@
-extern alias SemanticConventions;
-
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-using Conventions = SemanticConventions::OpenTelemetry.Trace.TraceSemanticConventions;
namespace KafkaFlow.OpenTelemetry;
@@ -19,7 +16,9 @@ internal static class ActivitySourceAccessor
internal static void SetGenericTags(Activity activity, IEnumerable bootstrapServers)
{
- activity?.SetTag(Conventions.AttributeMessagingSystem, MessagingSystemId);
- activity?.SetTag(Conventions.AttributePeerService, string.Join(",", bootstrapServers ?? Enumerable.Empty()));
+ // https://opentelemetry.io/docs/languages/net/libraries/#note-on-versioning
+ // https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.9.0/src/Shared/SemanticConventions.cs
+ activity?.SetTag("message.type", MessagingSystemId);
+ activity?.SetTag("peer.service", string.Join(",", bootstrapServers ?? Enumerable.Empty()));
}
-}
\ No newline at end of file
+}
diff --git a/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj b/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj
index 506126fe9..5f5264b18 100644
--- a/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj
+++ b/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj
@@ -5,10 +5,8 @@
-
-
- SemanticConventions
-
+
+
diff --git a/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj b/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj
index cc514a288..4bd706864 100644
--- a/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj
+++ b/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj
@@ -8,7 +8,8 @@
-
+
+
diff --git a/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj b/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj
index 252b999e7..21c42c990 100644
--- a/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj
+++ b/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj
@@ -8,7 +8,8 @@
-
+
+
diff --git a/src/KafkaFlow.Serializer.NewtonsoftJson/KafkaFlow.Serializer.NewtonsoftJson.csproj b/src/KafkaFlow.Serializer.NewtonsoftJson/KafkaFlow.Serializer.NewtonsoftJson.csproj
index 8d68ef533..f574ce345 100644
--- a/src/KafkaFlow.Serializer.NewtonsoftJson/KafkaFlow.Serializer.NewtonsoftJson.csproj
+++ b/src/KafkaFlow.Serializer.NewtonsoftJson/KafkaFlow.Serializer.NewtonsoftJson.csproj
@@ -13,6 +13,7 @@
+
diff --git a/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj b/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj
index 67808b7e5..d0a914e86 100644
--- a/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj
+++ b/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj
@@ -8,7 +8,8 @@
-
+
+
diff --git a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj
index c81fed089..728027c9e 100644
--- a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj
+++ b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj
@@ -13,10 +13,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj
index 2c3e2619a..172982e2a 100644
--- a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj
+++ b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj
@@ -8,7 +8,8 @@
-
+
+
diff --git a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj
index a99bcc155..fc9f4aebf 100644
--- a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj
+++ b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj
@@ -8,7 +8,8 @@
-
+
+
diff --git a/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj b/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj
index 63b2a5df4..a1f7f4ce5 100644
--- a/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj
+++ b/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj
@@ -11,7 +11,8 @@
-
+
+
diff --git a/src/KafkaFlow/Consumers/PartitionOffsets.cs b/src/KafkaFlow/Consumers/PartitionOffsets.cs
index 98575034d..108f6c02e 100644
--- a/src/KafkaFlow/Consumers/PartitionOffsets.cs
+++ b/src/KafkaFlow/Consumers/PartitionOffsets.cs
@@ -7,8 +7,8 @@ namespace KafkaFlow.Consumers;
internal class PartitionOffsets
{
- private readonly SortedDictionary _processedContexts = new();
- private readonly LinkedList _receivedContexts = new();
+ private readonly SortedDictionary _processedContexts = new ();
+ private readonly LinkedList _receivedContexts = new ();
public IConsumerContext DequeuedContext { get; private set; }
diff --git a/src/KafkaFlow/KafkaFlow.csproj b/src/KafkaFlow/KafkaFlow.csproj
index bebc9488a..a7618d9d8 100644
--- a/src/KafkaFlow/KafkaFlow.csproj
+++ b/src/KafkaFlow/KafkaFlow.csproj
@@ -7,10 +7,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj b/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj
index 9db78e47b..ba7a20db7 100644
--- a/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj
+++ b/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
false
true
@@ -16,21 +16,22 @@
+
-
-
-
-
+
+
+
+
true
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
diff --git a/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs b/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs
index d1e0d7e62..1aae88f33 100644
--- a/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs
+++ b/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs
@@ -37,7 +37,7 @@ public void Invoke_NotByteArrayMessage_ThrowsInvalidOperationException()
Func act = () => _target.Invoke(_contextMock.Object, _ => this.SetNextCalled());
// Assert
- act.Should().Throw();
+ act.Should().ThrowAsync();
_nextCalled.Should().BeFalse();
_contextMock.Verify(x => x.SetMessage(It.IsAny
diff --git a/tests/KafkaFlow.UnitTests/MessageContextTests.cs b/tests/KafkaFlow.UnitTests/MessageContextTests.cs
index 442b8ad34..fcf9e855a 100644
--- a/tests/KafkaFlow.UnitTests/MessageContextTests.cs
+++ b/tests/KafkaFlow.UnitTests/MessageContextTests.cs
@@ -1,6 +1,4 @@
using System.Collections.Generic;
-using KafkaFlow.Consumers;
-using KafkaFlow.Producers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
@@ -21,7 +19,7 @@ public void SetMessage_ShouldSetMessageCorrectly()
Mock.Of(),
Mock.Of>()
);
-
+
// Act
var changedMessage = messageContext.SetMessage("changed-key", "changed-value");
@@ -36,4 +34,4 @@ public void SetMessage_ShouldSetMessageCorrectly()
Assert.AreSame(messageContext.Brokers, changedMessage.Brokers);
Assert.AreSame(messageContext.Items, changedMessage.Items);
}
-}
\ No newline at end of file
+}
diff --git a/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs b/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs
index 4370ec540..98abeb226 100644
--- a/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs
+++ b/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs
@@ -87,7 +87,7 @@ public void Invoke_NotByteArrayMessage_ThrowsInvalidOperationException()
Func act = () => _target.Invoke(_contextMock.Object, _ => this.SetNextCalled());
// Assert
- act.Should().Throw();
+ act.Should().ThrowAsync();
_nextCalled.Should().BeFalse();
_contextMock.Verify(x => x.SetMessage(It.IsAny(), It.IsAny()), Times.Never);
_deserializerMock.Verify(
diff --git a/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs b/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs
index 4a1162d29..b06a586a7 100644
--- a/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs
+++ b/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs
@@ -1,3 +1,5 @@
+using System;
+using System.Collections.Generic;
using FluentAssertions;
using KafkaFlow.Middlewares.TypedHandler;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -26,9 +28,11 @@ public void AddSeveralMappings_GetHandlersTypesReturnsListOfHandlers()
// Assert
_target.GetHandlersTypes(typeof(int))
.Should()
- .BeEquivalentTo(
+ .BeEquivalentTo(new List
+ {
typeof(string),
typeof(double),
- typeof(bool));
+ typeof(bool)
+ });
}
}