hgaol opened a new issue, #3360:
URL: https://github.com/apache/incubator-shenyu/issues/3360

   ### Question
   
   I'm working on the zookeeper client registration for dotnet client, and I 
found the serialization for `zkClient` looks strange, see below.
   ![Pasted image 
20220428170506](https://user-images.githubusercontent.com/11908658/165719204-df04cfc5-80a6-4bc5-b602-6a62d0f3dfab.png)
   
   And `admin` also use the same serializer which is default one 
`SerializableSerializer` in package `org.I0Itec.zkclient`, which makes the 
format below cannot be deserialized correctly.
   
![image](https://user-images.githubusercontent.com/11908658/165719634-c5b8d3ea-7ffd-4e03-a09a-26e9abffe6bf.png)
   
   And will cause below exception.
   ![Pasted image 
20220428170748](https://user-images.githubusercontent.com/11908658/165719822-27e7992c-3132-44c5-843d-438812301432.png)
   
   `org.I0Itec.zkclient` also has a byte serializer, and I've tested that it 
works well and has no `strange number` when writing in zookeeper.
   
   I'm wonder if it's by design or a bug. Because I can't find the similar 
serializer in zookeeper official package or sdks in other language.
   
   If it's a bug, I can have a try to fix it and using the byte serializer 
instead. It will change all the places where `ZkClient` was used. The changes 
mainly looks like below, and also including some other small changes.
   ```diff
   -this.zkClient = new ZkClient(config.getServerLists(), sessionTimeout, 
connectionTimeout);
   +this.zkClient = new ZkClient(config.getServerLists(), sessionTimeout, 
connectionTimeout, new BytesPushThroughSerializer());
   ```
   
   If it's by design, I will try to investigate if any mitigation to solve this 
`strange number` issue.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to