Skip to content

feat: set ADD_TYPE_INFO_HEADERS to true and control it with new addTypeInfoHeader param#138

Merged
derberg merged 2 commits intoasyncapi:masterfrom
amrutprabhu:fix-add-type-infor-headers
Jun 15, 2021
Merged

feat: set ADD_TYPE_INFO_HEADERS to true and control it with new addTypeInfoHeader param#138
derberg merged 2 commits intoasyncapi:masterfrom
amrutprabhu:fix-add-type-infor-headers

Conversation

@amrutprabhu
Copy link
Contributor

@amrutprabhu amrutprabhu commented Jun 12, 2021

This sets the property of adding ADD_TYPE_INFO_HEADERS to true for Kafka.

Currently, it is set to false, Causing the producer to not add headers, and then the corresponding consumer is not able to do the type conversion.

the property being false, cause the next property i.e

props.put(JsonSerializer.TYPE_MAPPINGS,

of no use, as it's not able to add the headers.

Related issue(s)
This fixes the first part of the issue: #137
Resolves #137

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@amrutprabhu
Copy link
Contributor Author

This is my first PR, So I hope I am doing everything right 😄

@derberg
Copy link
Member

derberg commented Jun 14, 2021

@amrutprabhu looks good, according to docs default is true. But because it was false in the initial implementation we should at least make it configurable. So we need another param to support it. Just have a look into code how other params are supported and you'll figure out what needs to be changed, otherwise feel free to ping me of course

@amrutprabhu
Copy link
Contributor Author

Hey @derberg ,

I made the appropriate change. I let the default value be true. But if anyone wants to set it to false, can set the param addTypeInfoHeader to false.

Can you verify this ?

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

lgtm, great work 🚀

@derberg derberg changed the title fix: setting ADD_TYPE_INFO_HEADERS to true fix: set ADD_TYPE_INFO_HEADERS to true and control it with new addTypeInfoHeader param Jun 15, 2021
@derberg derberg changed the title fix: set ADD_TYPE_INFO_HEADERS to true and control it with new addTypeInfoHeader param feat: set ADD_TYPE_INFO_HEADERS to true and control it with new addTypeInfoHeader param Jun 15, 2021
@derberg
Copy link
Member

derberg commented Jun 15, 2021

@amrutprabhu I took liberty to adjust the PR title because this is not a bug fix but a new feature, new parameter. This way we will automatically trigger minor and not patch release

@derberg derberg merged commit 098b2b8 into asyncapi:master Jun 15, 2021
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@amrutprabhu
Copy link
Contributor Author

cool..
Thanks for merging the change. 🎉

@derberg
Copy link
Member

derberg commented Jun 15, 2021

@all-contributors please add @amrutprabhu for code

@allcontributors
Copy link
Contributor

@derberg

I've put up a pull request to add @amrutprabhu! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kafka Config: Type info mapping are not avaible in the header

3 participants