sofastack / sofa-bolt

SOFABolt is a lightweight, easy to use and high performance remoting framework based on Netty.
https://www.sofastack.tech/projects/sofa-bolt/
Apache License 2.0
2.42k stars 860 forks source link

报文格式能否完全支持自定义 #251

Closed mufanh closed 3 years ago

mufanh commented 3 years ago

Your question

今年才开始仔细看sofa-bolt,发现对于报文这一块,PROTOCOL和VERSION会占用前面几位,能否让报文完全支持完全自定义,否则对于存量的协议,这些限制导致不方便使用

Your scenes

比如现在想使用这个做一个服务代理,发现对报文有限制,就不方便直接使用

Your advice

有没有比较好的方式支持

Environment

dbl-x commented 3 years ago

这个功能已经考虑过了,计划在后续的版本中实现(预计是1.7之后的版本)。当然,如果你愿意提交PR来解决这个问题就更好了。 目前的问题是用户需要完全自定义报文的话需要继承修改的类太多,对用户来说太难用了。

mufanh commented 3 years ago

嗯嗯,我先按照我的想法看看能否有比较好的方式接入,谢谢