Skip to content

Commit

Permalink
fix: ProtobufNetDeserializer usages
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-sousa-8 committed Sep 20, 2023
1 parent 6e803cc commit 22a464b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using KafkaFlow.Middlewares.BatchConsume;
using KafkaFlow.Batching;

Check failure on line 4 in samples/KafkaFlow.Sample.BatchOperations/PrintConsoleMiddleware.cs

View workflow job for this annotation

GitHub Actions / Test deployment

The type or namespace name 'Batching' does not exist in the namespace 'KafkaFlow' (are you missing an assembly reference?)

namespace KafkaFlow.Sample.BatchOperations;

Expand Down
4 changes: 2 additions & 2 deletions samples/KafkaFlow.Sample.BatchOperations/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Linq;
using KafkaFlow;
using KafkaFlow.Middlewares.BatchConsume;
using KafkaFlow.Batching;

Check failure on line 4 in samples/KafkaFlow.Sample.BatchOperations/Program.cs

View workflow job for this annotation

GitHub Actions / Test deployment

The type or namespace name 'Batching' does not exist in the namespace 'KafkaFlow' (are you missing an assembly reference?)
using KafkaFlow.Producers;
using KafkaFlow.Sample.BatchOperations;
using KafkaFlow.Serializer;
Expand Down Expand Up @@ -37,7 +37,7 @@
.AddMiddlewares(
middlewares => middlewares
.AddDeserializer<JsonCoreDeserializer>()
.BatchConsume(10, TimeSpan.FromSeconds(10))
.AddBatching(10, TimeSpan.FromSeconds(10))
.Add<PrintConsoleMiddleware>()
)
)
Expand Down
2 changes: 1 addition & 1 deletion samples/KafkaFlow.Sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
.WithWorkersCount(3)
.AddMiddlewares(
middlewares => middlewares
.AddDeserializer<ProtobufNetSerializer>()
.AddDeserializer<ProtobufNetDeserializer>()
.AddTypedHandlers(h => h.AddHandler<PrintConsoleHandler>())
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static IClusterConfigurationBuilder EnableAdminMessages(
.DisableManagement()
.AddMiddlewares(
middlewares => middlewares
.AddDeserializer<ProtobufNetSerializer>()
.AddDeserializer<ProtobufNetDeserializer>()
.AddTypedHandlers(
handlers => handlers
.WithHandlerLifetime(InstanceLifetime.Singleton)
Expand Down Expand Up @@ -123,7 +123,7 @@ public static IClusterConfigurationBuilder EnableTelemetry(
.WithAutoOffsetReset(AutoOffsetReset.Latest)
.AddMiddlewares(
middlewares => middlewares
.AddDeserializer<ProtobufNetSerializer>()
.AddDeserializer<ProtobufNetDeserializer>()
.AddTypedHandlers(
handlers => handlers
.WithHandlerLifetime(InstanceLifetime.Singleton)
Expand Down
6 changes: 3 additions & 3 deletions src/KafkaFlow.IntegrationTests/Core/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private static void SetupServices(HostBuilderContext context, IServiceCollection
.WithAutoOffsetReset(AutoOffsetReset.Latest)
.AddMiddlewares(
middlewares => middlewares
.AddSingleTypeSerializer<ProtobufNetSerializer>(typeof(TestMessage1))
.AddSingleTypeDeserializer<ProtobufNetDeserializer>(typeof(TestMessage1))
.AddTypedHandlers(
handlers =>
handlers
Expand All @@ -229,7 +229,7 @@ private static void SetupServices(HostBuilderContext context, IServiceCollection
})
.AddMiddlewares(
middlewares => middlewares
.AddSingleTypeDeserializer<PauseResumeMessage, ProtobufNetSerializer>()
.AddSingleTypeDeserializer<PauseResumeMessage, ProtobufNetDeserializer>()
.AddTypedHandlers(
handlers =>
handlers
Expand Down Expand Up @@ -287,7 +287,7 @@ private static void SetupServices(HostBuilderContext context, IServiceCollection
.AddMiddlewares(
middlewares => middlewares
.AddDecompressor<GzipMessageDecompressor>()
.AddDeserializer<ProtobufNetSerializer>()
.AddDeserializer<ProtobufNetDeserializer>()
.AddTypedHandlers(
handlers =>
handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddDeserializer<TDeseriali
/// <typeparam name="TMessage">The message type</typeparam>
/// <typeparam name="TDeserializer">A class that implements <see cref="IDeserializer"/></typeparam>
/// <returns></returns>
public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer<TMessage, TDeserializer>(
public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer<TMessage, TDeserializer>(
this IConsumerMiddlewareConfigurationBuilder middlewares,
Factory<TDeserializer> serializerFactory)
where TDeserializer : class, IDeserializer
Expand All @@ -115,7 +115,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer<
this IConsumerMiddlewareConfigurationBuilder middlewares)
where TDeserializer : class, IDeserializer
{
return middlewares.AddSingleTypeSerializer<TDeserializer>(typeof(TMessage));
return middlewares.AddSingleTypeDeserializer<TDeserializer>(typeof(TMessage));
}

/// <summary>
Expand All @@ -125,7 +125,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer<
/// <param name="messageType">The message type</param>
/// <typeparam name="TDeserializer">A class that implements <see cref="IDeserializer"/></typeparam>
/// <returns></returns>
public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer<TDeserializer>(
public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer<TDeserializer>(
this IConsumerMiddlewareConfigurationBuilder middlewares,
Type messageType)
where TDeserializer : class, IDeserializer
Expand All @@ -145,7 +145,7 @@ public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer<TD
/// <param name="messageType">The message type</param>
/// <typeparam name="TDeserializer">A class that implements <see cref="IDeserializer"/></typeparam>
/// <returns></returns>
public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeSerializer<TDeserializer>(
public static IConsumerMiddlewareConfigurationBuilder AddSingleTypeDeserializer<TDeserializer>(
this IConsumerMiddlewareConfigurationBuilder middlewares,
Factory<TDeserializer> serializerFactory,
Type messageType)
Expand Down

0 comments on commit 22a464b

Please sign in to comment.