-
Notifications
You must be signed in to change notification settings - Fork 79
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
Possibility to produce avro encoded message to schema registry powered topic #123
Comments
I'm sorry but I don't see what you are aiming at. Cheers |
Hello @d-rk, sorry for late response, this is a wider explanation of the improvement. Use case with errors
{
"name": "CreateUserProfileWallet",
"namespace": "Messaging.Contracts.WalletManager.Commands",
"type": "record",
"fields": [
{ "name": "CurrencyCode", "type": "string" },
{ "name": "ExpiresOn", "type": ["null", "string"] }
]
}
So, the messages are not working with Existing solutionTo overcome a problem - JSON files must be changed to some unfriendly format.
Improvement requestAs a user I'd like Currently this is working for some other tools, e.g. AKHQ UI, but it is missing for CLI based tools. |
Hey @eshepelyuk we are using https://github.com/linkedin/goavro for the avro de/serialization. If you want to omit fields in the json you can specify a default in the schema:
With this schema your first use-case should work. For the second use-case check this issue: linkedin/goavro#106. So I guess there is not much we can do here. |
Hello @d-rk I've been able to advance on the issue using small python program that leverages fastavro python library. So my script is able to create AVRO json ( i.e. weird JSON with types ) from plain JSON. Then resulting AVRO JSON can be sent to kafka using Attaching a new archive containing the script. Plz install fastavro with pip to use it. Script can be used like this ./json2avro.py create-null.json | kafkactl produce create_user_profile_wallet Could you take a look and check if your libraries support the same functionality, so it can be eventually implemented in |
Hey @eshepelyuk I saw that the latest goavro version supports ingesting standard json directly instead of avro json format. I already tested it out, but sadly it only works for encoding of avro messages and not for the decoding of avro messages. |
I see this mention over here too. Thanks you two. |
Hello |
make avro json codec configurable (fixes #123)
@d-rk Release 3.0 failed, so this feature is not yet released. |
Hello
Some tools allow to produce Avro encoded messages to a topic, using schema from schema registry, with pure JSON file as input message.
For example this https://github.com/tchiotludo/akhq
The text was updated successfully, but these errors were encountered: