-
Notifications
You must be signed in to change notification settings - Fork 512
KafkaPubSub avro decimal - only unscaled value is sent to underlying service #3721
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
Comments
Overall, the Avro support in dapr doesn't really have support for |
Thank you for the reply. At least I can change it to feature request, do you agree? |
Well it's down to the avro library implementation. We use goavro. The more prevalent hamba/avro is not a good option because it doesn't support avro/standard Json conversion. It only expects go native types. To make it all work with dapr we have to go through JSON as the lowest common denominator. In the current implementation, we go from standard Json to avro as opposed to avro Json which has higher type accuracy. I could create a branch for you to test locally |
Actually this is an issue for the component-contrib repo, not the dapr one. Please close this one and create one on the appropriate repo. |
Thank you for moving the issue to the proper repository. I haven't had time recently and now I see it is already done. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions. |
What version of Dapr?
v1.14.4, v1.15.3
Expected Behavior
When using avro decimal property
Dapr should send probably a string representation of a decimal to a service.
Actual Behavior
Only bytes of unscaled value are sent to a service. Services must handle precision/scale on their own.
Steps to Reproduce the Problem
Setup a Kafka PubSub topic subscriber which uses an avro schema with any decimal property. Publish a message (using any tool). In a underlying service check an incomming request (from Dapr).
The text was updated successfully, but these errors were encountered: