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

Feature/add-kafka-pubsub-schema-registry #3946

Merged
merged 17 commits into from
Jan 12, 2024

Conversation

passuied
Copy link
Contributor

Description

Added doc for Kafka Pubsub component Avro Schema registry support

Issue reference

#3930

Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
@passuied passuied requested review from a team as code owners January 10, 2024 05:21
Copy link
Collaborator

@hhunter-ms hhunter-ms left a comment

Choose a reason for hiding this comment

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

quick grammar review

passuied and others added 7 commits January 10, 2024 09:20
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
@passuied passuied requested a review from hhunter-ms January 10, 2024 17:21
passuied and others added 7 commits January 10, 2024 09:22
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
…ubsub/setup-apache-kafka.md

Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

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

Added some additional comments.

- `2024-01-10` should be passed as `19732` (the number of days since Jan 1st, 1970)

### Publishing Avro messages
In order to indicate to the Kafka pub/sub component that the message should be using Avro serialization, the `valueSchemaType` metadata must be set to `Avro`.
Copy link
Member

Choose a reason for hiding this comment

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

Should the valueSchemaType metadata be defined in the Spec Metadata fields https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-apache-kafka/#spec-metadata-fields?
I did not see this here, is this missing and is this something that was added for this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

valueSchemaType is NOT a spec metadata but a metadata field that you can set within the topic subscription and the publish metadata, similar to the rawPayload metadata

Copy link
Member

Choose a reason for hiding this comment

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

I see. So an example would be

curl -X "POST" http://localhost:3500/v1.0/publish/pubsub/TOPIC_A?metadata.valueSchemaType=Avro -H "Content-Type: application/json" -d '{"order-number": "345"}'

It is always useful to give an example of some form to help. Would the above be correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The example is below actually

…ubsub/setup-apache-kafka.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Patrick Assuied <patrick.assuied@elationhealth.com>
@passuied passuied requested a review from msfussell January 11, 2024 21:49
@msfussell
Copy link
Member

@passuied Replied to you comment. PTAL.

@passuied
Copy link
Contributor Author

@msfussell I'm unclear what else is missing. I have added all samples originally

@yaron2 yaron2 merged commit ae4e137 into dapr:v1.13 Jan 12, 2024
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.

4 participants