-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: merge projects into core framework
- Loading branch information
1 parent
d5a9c21
commit 07b7cfd
Showing
114 changed files
with
626 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/KafkaFlow.Sample.BatchOperations/PrintConsoleMiddleware.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/KafkaFlow.Sample.PauseConsumerOnError/MessageHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 16 additions & 15 deletions
31
samples/KafkaFlow.Sample.SchemaRegistry/Handlers/AvroMessageHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
namespace KafkaFlow.Sample.SchemaRegistry.Handlers; | ||
|
||
using System; | ||
using System.Threading.Tasks; | ||
using global::SchemaRegistry; | ||
using TypedHandler; | ||
|
||
public class AvroMessageHandler : IMessageHandler<AvroLogMessage> | ||
namespace KafkaFlow.Sample.SchemaRegistry.Handlers | ||
{ | ||
public Task Handle(IMessageContext context, AvroLogMessage message) | ||
using System; | ||
using System.Threading.Tasks; | ||
using KafkaFlow.Middlewares.TypedHandler; | ||
using global::SchemaRegistry; | ||
|
||
public class AvroMessageHandler : IMessageHandler<AvroLogMessage> | ||
{ | ||
Console.WriteLine( | ||
"Partition: {0} | Offset: {1} | Message: {2} | Avro", | ||
context.ConsumerContext.Partition, | ||
context.ConsumerContext.Offset, | ||
message.Severity.ToString()); | ||
public Task Handle(IMessageContext context, AvroLogMessage message) | ||
{ | ||
Console.WriteLine( | ||
"Partition: {0} | Offset: {1} | Message: {2} | Avro", | ||
context.ConsumerContext.Partition, | ||
context.ConsumerContext.Offset, | ||
message.Severity.ToString()); | ||
|
||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/KafkaFlow.Sample.SchemaRegistry/Handlers/ProtobufMessageHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace KafkaFlow | ||
{ | ||
/// <summary> | ||
/// Used to create a message decompressor | ||
/// </summary> | ||
public interface IDecompressor | ||
{ | ||
/// <summary> | ||
/// Decompress the given message | ||
/// </summary> | ||
/// <param name="message">The message to be decompressed</param> | ||
/// <returns>The decompressed message</returns> | ||
byte[] Decompress(byte[] message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace KafkaFlow | ||
{ | ||
using System; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Used to implement a message serializer | ||
/// </summary> | ||
public interface IDeserializer | ||
{ | ||
/// <summary> | ||
/// Deserializes the given message | ||
/// </summary> | ||
/// <param name="input">A stream to read the data to be deserialized</param> | ||
/// <param name="type">The type to be created</param> | ||
/// <param name="context">An object containing metadata</param> | ||
/// <returns>The deserialized message</returns> | ||
Task<object> DeserializeAsync(Stream input, Type type, ISerializerContext context); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...KafkaFlow.TypedHandler/IMessageHandler.cs → ...KafkaFlow.Abstractions/IMessageHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace KafkaFlow.TypedHandler | ||
namespace KafkaFlow | ||
{ | ||
using System.Threading.Tasks; | ||
|
||
|
Oops, something went wrong.