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

Nullable fields in a body to be configurable #795

Closed
luica13 opened this issue Aug 18, 2021 · 4 comments
Closed

Nullable fields in a body to be configurable #795

luica13 opened this issue Aug 18, 2021 · 4 comments
Labels
backend Need a backend update enhancement New feature or request topic data Kafka Topic data

Comments

@luica13
Copy link

luica13 commented Aug 18, 2021

For viewing message body in AvroToJsonSerializer it was added to show only non_null and non_empty fields. It will be better to have it configurable, as these fields needed to be viewed for many cases(check wether nullable fields are pushed, etc.)

0.17.0...0.18.0#diff-e52f62409aed8a22b8fe718f08bb367e172a445c078a145b771dd3c302d0aed8R17

@tchiotludo tchiotludo added backend Need a backend update enhancement New feature or request topic data Kafka Topic data labels Aug 18, 2021
@tchiotludo
Copy link
Owner

Simple here !
a PR is welcome to add some configuration properties for that

@magnusgundersen
Copy link
Contributor

Did a quick suggestion on solving this feature. #799
Any thoughs?

@twobeeb
Copy link
Contributor

twobeeb commented Sep 16, 2021

I just encountered this issue recently.

It was very difficult to understand at first because the field defined with AVRO was mandatory yet it was not displayed in AKHQ.
After investigation, the producer set the value "" which doesn't show up in AKHQ in 0.18.

Message displayed with kafka-avro-console-consumer :

{
  "ProductionDay": 1631671200000,
  "Machine": "", <----- Mandatory in AVRO
  "Series": null,  <----- Optional in AVRO
  "Operator": {
    "string": "xxxxx"
  },
  "Product": {
    "SerialNumber": "0014479"
  }
}

The same message in AKHQ :

{
  "ProductionDay": 1631671200000,
  "Operator": {
    "string": "xxxxx"
  },
  "Product": {
    "SerialNumber": "0014479"
  }
}

I believe the defaults NON_EMPTY and NON_NULL are VERY misleading (NON_EMPTY particularly)
@tchiotludo @magnusgundersen
What's your opinion on this (the defaults set on PR #799) ?

@tchiotludo
Copy link
Owner

good catch, I remove the NON_EMPTY defaults

tchiotludo added a commit that referenced this issue Oct 24, 2021
@tchiotludo tchiotludo moved this to Done in Backlog Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Need a backend update enhancement New feature or request topic data Kafka Topic data
Projects
Status: Done
Development

No branches or pull requests

4 participants