Skip to content
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

WIP feat: support Kafka messages with nullable or empty partition key #87

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

sergioamribeiro
Copy link
Contributor

@sergioamribeiro sergioamribeiro commented May 7, 2022

Description

This merge request adds protection for the kafka messages that arrive without a value for the partition key (null or empty). The Retry will receive the messages and put them in the same queue and follow that order to process

Fixes # (10)

How Has This Been Tested?

We've made some unit and integration tests (see EmptyPartitionKeyRetryDurableTests class)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have made corresponding changes to the documentation

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

@sergioamribeiro sergioamribeiro force-pushed the us/support-nullable-partition-key branch from 0525ef7 to 7f1e964 Compare May 11, 2022 17:37
brunohfgomes
brunohfgomes previously approved these changes May 12, 2022
carlosgoias
carlosgoias previously approved these changes May 19, 2022
Daniel-C-Dias
Daniel-C-Dias previously approved these changes May 20, 2022
Copy link
Contributor

@fernando-a-marins fernando-a-marins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not ready to support Null partition keys

using Xunit;

[Collection("BootstrapperHostCollection")]
public class EmptyPartitionKeyRetryDurableTests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's missing tests with the null partition key. But please check my other comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't test with a null partition because the Kafka flow doesn't support it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can test it if the test does not start with the production of a Kafka message but with a consumption. If we want to support null partition keys we should have a test for it.

@carlosgoias carlosgoias changed the title feat: support Kafka messages with nullable or empty partition key WIP feat: support Kafka messages with nullable or empty partition key Dec 9, 2022
@sergioamribeiro sergioamribeiro marked this pull request as draft March 6, 2023 15:25
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.

7 participants