-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Deserialize Protobuf messages using descriptor files #472
Deserialize Protobuf messages using descriptor files #472
Conversation
03b2bb8
to
b14b90f
Compare
Real good stuff here :) |
I'm a noob about schema registry )) We do not use it in our team, so for now I can't make an integration. But maybe I will learn something about Schema Registry further. |
22c4787
to
ac7009d
Compare
I look at this quickly, really thanks for the hard works 👍
The regexp seems to be fine IMO since it allow a large use case, IMO no need to have a UI change for this, since the user will need to upload new definition, the ui select seems to be useless and the regexp is fine. |
Regarding the first thing, do you mean to define Protobuf descriptors right in AKHQ configuration? I'm afraid it's not possible, because Protobuf descriptor is binary data. I also think that directory mount is not fine, but when you start in docker-compose it's not a problem to mount volume, and when you start in Kubernetes I really hope that we can use Config Maps to store Protobuf descriptors. As far as I know, Config Maps can be created from file and it's not a problem that the file contains binary data (not plain text). So Persistent Volumes will not be necessary. I will check is it possible to create Config Map using descriptor file. Regarding the second thing, good point, thanks, I just did not think that there are can be several clusters. I will make changes. |
For the first point, why not just need to base64 in the files in the configuration ? |
Hm, interesting idea, I will try with base64. |
ac7009d
to
0a48ec5
Compare
Hi, @tchiotludo ! P.S. I made "ammend last commit" and force push, because it was easier for me and changes were significant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a really good stuff !
I've comment some minor change on review to have Protobuf everywhere and to keep the whole logic on CustomDeserializerRepository
.
Just few changed and merged !
0a48ec5
to
5ff02de
Compare
5ff02de
to
27c6ac6
Compare
I have made changes, removed indent changes in all files and fix other observations. Seems, now it should be ok and ready for merge :) |
Seems to be perfect :) @jorgheymans may you can try the dev branch please and see if it's work like your fork ? Thanks @xakassi for these one ! |
Interesting, i was not aware of this PR. I'll have a look how it works for our case, thanks @xakassi ! |
Great! |
It will be great, I think people is waiting for it ! |
Note that Schema Registry already supports protobuf
https://www.confluent.io/blog/confluent-platform-now-supports-protobuf-json-schema-custom-formats/
But it's good to have basic serde support in AKHQ and not tie this tool
into the Confluent tooling suit.
…On Wed, Nov 11, 2020 at 1:21 PM Ludovic DEHON ***@***.***> wrote:
It will be great, I think people is waiting for it !
Whatever, thanks for the long awaited features 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#472 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABPKAFIMB4UXKNLXDNWAB3SPJ6WBANCNFSM4S22IV3A>
.
|
Thanks for the effort @xakassi ! Can we keep the proto definition external to the akhq configuration file ?
So i would propose to keep the external file loading, or even better to support spring-like url protocols |
good catch @jorgheymans . |
Sure, i think both options should be present. @xakassi would you mind reinstating the file based descriptor loading alongside the base64 ? |
Hi, guys! |
@xakassi @tchiotludo This is a very nice enhancement. We use this UI here, in VMware. AKHQ increases our productivity. We waited for a long time for Protubuf deserialization. |
@tchiotludo sure, I will check about it. Thanks! |
Fix #149
Add ability to deserialize topics containing data in Protobuf format.
To deserialize topics containing data in Protobuf format, you can put descriptor files in some folder
descriptors-folder
and set topics mapping: for each
topic-regex
you can specifydescriptor-file
name (fromdescriptors-folder
)and corresponding message types for keys and values. If, for example, keys are not in Protobuf format,
key-message-type
can be omitted, the same forvalue-message-type
.Example configuration:
First I tried to do without configuration for topics - try to deserialize binary data just using all descriptor files from
descriptors-folder
, but it turned out that messages can be deserialized incorrectly by not-matching descriptor and we cannot understand it dynamically.So, I added ability to specify regex for topics and corresponding descriptor files and message types for key and values.
Maybe you will consider that it's better to be able to choose descriptors and message types from drop down menu on UI... but for now I did not change UI. The idea with regexes in configuration looks not bad for me.
Please, give me your opinion.
P.S. In unit tests
AlbumProto
andFilmProto
are auto-generated by Protobuf classes, you have no need to review them. Scripts used for generation of Java classes and descriptor classes are provided in/src/test/resources/protobuf_proto
folder.