diff --git a/samples/KafkaFlow.Sample.BatchOperations/PrintConsoleMiddleware.cs b/samples/KafkaFlow.Sample.BatchOperations/PrintConsoleMiddleware.cs index 11d38754d..438689b7a 100644 --- a/samples/KafkaFlow.Sample.BatchOperations/PrintConsoleMiddleware.cs +++ b/samples/KafkaFlow.Sample.BatchOperations/PrintConsoleMiddleware.cs @@ -1,7 +1,7 @@ using System; using System.Linq; using System.Threading.Tasks; -using KafkaFlow.Middlewares.BatchConsume; +using KafkaFlow.Batching; namespace KafkaFlow.Sample.BatchOperations; diff --git a/samples/KafkaFlow.Sample.BatchOperations/Program.cs b/samples/KafkaFlow.Sample.BatchOperations/Program.cs index 309445869..d2597957b 100644 --- a/samples/KafkaFlow.Sample.BatchOperations/Program.cs +++ b/samples/KafkaFlow.Sample.BatchOperations/Program.cs @@ -1,7 +1,7 @@ using System; using System.Linq; using KafkaFlow; -using KafkaFlow.Middlewares.BatchConsume; +using KafkaFlow.Batching; using KafkaFlow.Producers; using KafkaFlow.Sample.BatchOperations; using KafkaFlow.Serializer; @@ -37,7 +37,7 @@ .AddMiddlewares( middlewares => middlewares .AddDeserializer() - .BatchConsume(10, TimeSpan.FromSeconds(10)) + .AddBatching(10, TimeSpan.FromSeconds(10)) .Add() ) ) diff --git a/samples/KafkaFlow.Sample/Program.cs b/samples/KafkaFlow.Sample/Program.cs index 4f2e313e1..54339254d 100644 --- a/samples/KafkaFlow.Sample/Program.cs +++ b/samples/KafkaFlow.Sample/Program.cs @@ -33,7 +33,7 @@ .WithWorkersCount(3) .AddMiddlewares( middlewares => middlewares - .AddDeserializer() + .AddDeserializer() .AddTypedHandlers(h => h.AddHandler()) ) ) diff --git a/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs b/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs index cefd11e59..a705233d7 100644 --- a/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs +++ b/src/KafkaFlow.Admin/Extensions/ClusterConfigurationBuilderExtensions.cs @@ -54,7 +54,7 @@ public static IClusterConfigurationBuilder EnableAdminMessages( .DisableManagement() .AddMiddlewares( middlewares => middlewares - .AddDeserializer() + .AddDeserializer() .AddTypedHandlers( handlers => handlers .WithHandlerLifetime(InstanceLifetime.Singleton) @@ -123,7 +123,7 @@ public static IClusterConfigurationBuilder EnableTelemetry( .WithAutoOffsetReset(AutoOffsetReset.Latest) .AddMiddlewares( middlewares => middlewares - .AddDeserializer() + .AddDeserializer() .AddTypedHandlers( handlers => handlers .WithHandlerLifetime(InstanceLifetime.Singleton) diff --git a/src/KafkaFlow.IntegrationTests/Core/Bootstrapper.cs b/src/KafkaFlow.IntegrationTests/Core/Bootstrapper.cs index 5c83c6ac9..a50c44516 100644 --- a/src/KafkaFlow.IntegrationTests/Core/Bootstrapper.cs +++ b/src/KafkaFlow.IntegrationTests/Core/Bootstrapper.cs @@ -208,7 +208,7 @@ private static void SetupServices(HostBuilderContext context, IServiceCollection .WithAutoOffsetReset(AutoOffsetReset.Latest) .AddMiddlewares( middlewares => middlewares - .AddSingleTypeSerializer(typeof(TestMessage1)) + .AddSingleTypeDeserializer(typeof(TestMessage1)) .AddTypedHandlers( handlers => handlers @@ -229,7 +229,7 @@ private static void SetupServices(HostBuilderContext context, IServiceCollection }) .AddMiddlewares( middlewares => middlewares - .AddSingleTypeDeserializer() + .AddSingleTypeDeserializer() .AddTypedHandlers( handlers => handlers @@ -287,7 +287,7 @@ private static void SetupServices(HostBuilderContext context, IServiceCollection .AddMiddlewares( middlewares => middlewares .AddDecompressor() - .AddDeserializer() + .AddDeserializer() .AddTypedHandlers( handlers => handlers diff --git a/src/KafkaFlow/Serializer/Configuration/ConsumerMiddlewareConfigurationBuilder.cs b/src/KafkaFlow/Serializer/Configuration/ConsumerMiddlewareConfigurationBuilder.cs index 0000a6642..487731d1f 100644 --- a/src/KafkaFlow/Serializer/Configuration/ConsumerMiddlewareConfigurationBuilder.cs +++ b/src/KafkaFlow/Serializer/Configuration/ConsumerMiddlewareConfigurationBuilder.cs @@ -94,7 +94,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddDeserializerThe message type /// A class that implements /// - public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer( + public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer( this IConsumerMiddlewareConfigurationBuilder middlewares, Factory serializerFactory) where TDeserializer : class, IDeserializer @@ -115,7 +115,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer< this IConsumerMiddlewareConfigurationBuilder middlewares) where TDeserializer : class, IDeserializer { - return middlewares.AddSingleTypeSerializer(typeof(TMessage)); + return middlewares.AddSingleTypeDeserializer(typeof(TMessage)); } /// @@ -125,7 +125,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer< /// The message type /// A class that implements /// - public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer( + public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer( this IConsumerMiddlewareConfigurationBuilder middlewares, Type messageType) where TDeserializer : class, IDeserializer @@ -145,7 +145,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializerThe message type /// A class that implements /// - public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer( + public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer( this IConsumerMiddlewareConfigurationBuilder middlewares, Factory serializerFactory, Type messageType)