Skip to content

Improve parse chunk consumer side #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 25, 2025
Merged

Improve parse chunk consumer side #423

merged 19 commits into from
Jun 25, 2025

Conversation

Gsantomaggio
Copy link
Member

@Gsantomaggio Gsantomaggio commented Jun 17, 2025

  • Improve the CRC32 validation:
    1- Crc32 is enabled by default
    2- Add System.IO.Hashing dependency
    3- A function is called when CRC32 fails, the user can decide to ChunkAction.Skip skip the chunk or TryToParse
    4- Inside the function, the user can add custom code, for example here can close the consumer:
var consumerConfig = new ConsumerConfig(system, stream)
        {
            Crc32 = new StreamCrc32()
            {
                FailAction = sourceConsumer =>
                {
                    sourceConsumer.Close();
                    return ChunkAction.Skip; // Skip the chunk and close the consumer
                }
            },
            MessageHandler = (_, _, _, _) => Task.CompletedTask
        };
  • Pin the .NET versions
  • Remove the tests for .NET 9 and leave only for .NET 8 to increase the speed

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio added this to the 1.8.15 milestone Jun 23, 2025
add System.IO.Hashing dependecy

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
in case of the crc32 fails and the user want to add a custom code

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Add documentation

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio marked this pull request as ready for review June 25, 2025 18:01
@Gsantomaggio Gsantomaggio merged commit de1ecf5 into main Jun 25, 2025
2 checks passed
@Gsantomaggio Gsantomaggio deleted the improve_parse_chunk branch June 25, 2025 18:50
@Gsantomaggio Gsantomaggio mentioned this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant