Closed pantianying closed 4 years ago
Hi,
I am happy that you find the tool useful ;-)
Kafka-proxy modifies only host and port fields in Metadata and FindCoordinator responses. Other messages are simply passed through avoiding any unnecessary memory allocations.
It was not a goal of this project to be part of a library etc. Main goals were:
Coming back to your intention.
Currently there are 48 message types * 2 for request and response. Each message can have multiple versions e.g. Metadata has currently 10 different versions. Additionally there are 3 request and response header versions which are coupled to message versions.
If you want to be able to modify any message, you must be able to deserialize and serialize any message version ( which of course will affect performance)
If I were you I would start with some generator, taking some textual input and generating decoders and encoders. Kafka itself generates such java codecs for its internal usage. You should also expect that any new Kafka version can provide new message types or message versions.
Kind regards, Michal
Hi,
I am happy that you find the tool useful ;-)
Kafka-proxy modifies only host and port fields in Metadata and FindCoordinator responses. Other messages are simply passed through avoiding any unnecessary memory allocations.
It was not a goal of this project to be part of a library etc. Main goals were:
- access kafka running in kubernetes
- allow to access kafka through sock5 and http proxies
- allow local sasl termination
- provide sasl initilized by proxy
- provide additional security not provided by Kafka
Coming back to your intention.
Currently there are 48 message types * 2 for request and response. Each message can have multiple versions e.g. Metadata has currently 10 different versions. Additionally there are 3 request and response header versions which are coupled to message versions.
If you want to be able to modify any message, you must be able to deserialize and serialize any message version ( which of course will affect performance)
If I were you I would start with some generator, taking some textual input and generating decoders and encoders. Kafka itself generates such java codecs for its internal usage. You should also expect that any new Kafka version can provide new message types or message versions.
Kind regards, Michal
Thank you so detailed reply, I encountered some problems in the use, can you give me a contact information. I also want to meet a German friend. My email is pantianying@gmail.com
In use, I found that Kafka proxy can only be used when it is deployed with the client side, but not independently or on the Kafka server-side machine. What is the principle of this. the client print 'panic: dial tcp 127.0.0.1:12851: connect: connection refused'
@pantianying I am not aware of any restriction why kafka-proxy cannot be used on the server side. Your problem is probably attributed to some misconfiguration.
BTW. If you want to send my a private message you can use an email from the release commits.
@pantianying modify code here
Hello, I am using this library as a proxy for our Kafka cluster. Now we have a requirement to change some data of Kafka packets, such as topic content, at the Kafka proxy level. So we need to parse each package, rather than simply do 4-tier proxy. I hope we can discuss this . thank you very mush~