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/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj b/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj
index 6336785ab..8ac90b0b0 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..70fbad02c 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..6c40a4352 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..7f3837678 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..fa57c3f89 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..0ad4be31e 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..7083335d4 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..4e722a164 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..0b5671655 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/Directory.Build.props b/src/Directory.Build.props
index 673cb04c4..18a42ca4b 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,6 +1,6 @@
- 10.0
+ 13.0
true
true
snupkg
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..d38abd045 100644
--- a/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj
+++ b/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj b/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj
index ae071e278..06fc64b9c 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,7 +23,7 @@
-
+
diff --git a/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj b/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj
index 44b6cf74e..4d08303a1 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
diff --git a/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj b/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj
index 69586386a..ba02e372e 100644
--- a/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj
+++ b/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj
@@ -9,4 +9,5 @@
+
\ 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..f8fb7a721 100644
--- a/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj
+++ b/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj b/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj
index 44287854f..66b3831e9 100644
--- a/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj
+++ b/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj b/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj
index a2ef2b168..e85ba513d 100644
--- a/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj
+++ b/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj b/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj
index ebd8ab6a0..314d4ccdd 100644
--- a/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj
+++ b/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj
@@ -13,7 +13,7 @@
-
+
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..612e8d3bc 100644
--- a/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj
+++ b/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj
@@ -5,10 +5,7 @@
-
-
- SemanticConventions
-
+
diff --git a/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj b/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj
index cc514a288..a1d828116 100644
--- a/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj
+++ b/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj b/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj
index 252b999e7..430fa4a37 100644
--- a/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj
+++ b/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj b/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj
index 67808b7e5..41695639d 100644
--- a/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj
+++ b/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj
@@ -8,7 +8,7 @@
-
+
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..4617f478d 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,10 @@
-
-
-
-
+
+
+
+
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..44b8ca146 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,7 @@
-
+
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..c36548668 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,7 @@
-
+
diff --git a/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj b/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj
index 63b2a5df4..be63509e1 100644
--- a/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj
+++ b/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/src/KafkaFlow/KafkaFlow.csproj b/src/KafkaFlow/KafkaFlow.csproj
index bebc9488a..39f3cb217 100644
--- a/src/KafkaFlow/KafkaFlow.csproj
+++ b/src/KafkaFlow/KafkaFlow.csproj
@@ -7,10 +7,10 @@
-
-
-
-
+
+
+
+
diff --git a/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj b/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj
index 9db78e47b..a057cfbcb 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
@@ -18,19 +18,19 @@
-
-
-
-
+
+
+
+
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/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)
+ });
}
}