dubbo实例
所属分类 dubbo
浏览量 1459
启动 zk
./bin/zkServer.sh start
dubbo-hello-provider
启动 provider
mvn -Djetty.port=8010 jetty:run
http://127.0.0.1:8010/
echo 接口 ,可配置 echo size 大小 , sleep 时间 用于模拟接口响应耗时
dubbo-hello-consumer
启动 consumer
mvn -Djetty.port=8020 jetty:run
http://127.0.0.1:8020/
zk上元数据信息
./zkCli.sh
./zkCli.sh -timeout 5000 -server 127.0.0.1:2181
ls /dubbo/dyyx.HelloService
[consumers, configurators, routers, providers]
ls /dubbo/dyyx.HelloService/providers
[dubbo%3A%2F%2F10.57.240.29%3A20880%2Fdyyx.HelloService%3Fanyhost%3Dtrue%26application%3Dhello-provider%26dubbo%3D2.8.4%26generic%3Dfalse%26group%3Dgroup1%26interface%3Ddyyx.HelloService%26methods%3DgetInfo%2Cecho%26organization%3Ddyyx-org%26owner%3Ddyyx%26pid%3D5677%26side%3Dprovider%26threads%3D10%26timeout%3D3000%26timestamp%3D1573208943122]
urldecoder
[dubbo://10.57.240.29:20880/dyyx.HelloService?anyhost=true&application=hello-provider&dubbo=2.8.4&generic=false&group=group1&interface=dyyx.HelloService&methods=getInfo,echo&organization=dyyx-org&owner=dyyx&pid=5677&side=provider&threads=10&timeout=3000×tamp=1573208943122]
ls /dubbo/dyyx.HelloService/consumers
[consumer%3A%2F%2F10.57.240.29%2Fdyyx.HelloService%3Fapplication%3Dhello-consumer%26category%3Dconsumers%26check%3Dfalse%26connections%3D3%26dubbo%3D2.8.4%26group%3Dgroup1%26interface%3Ddyyx.HelloService%26methods%3DgetInfo%2Cecho%26organization%3Ddyyx-org%26owner%3Ddyyx%26pid%3D6240%26retries%3D0%26side%3Dconsumer%26timeout%3D500%26timestamp%3D1573209503388]
[consumer://10.57.240.29/dyyx.HelloService?application=hello-consumer&category=consumers&check=false&connections=3&dubbo=2.8.4&group=group1&interface=dyyx.HelloService&methods=getInfo,echo&organization=dyyx-org&owner=dyyx&pid=6240&retries=0&side=consumer&timeout=500×tamp=1573209503388]
ls /dubbo/dyyx.HelloService/configurators
ls /dubbo/dyyx.HelloService/routers
完整代码
https://gitee.com/dyyx/dubbodemo/
dubbo性能相关参数
dubbo telnet 命令使用
上一篇
下一篇
netty4 ChannelInboundHandler 使用
ChannelPipeline和ChannelInitializer
netty ByteBuf 使用
IO模式 Proactor与Reactor
select poll epoll 区别
netty ByteBuf vs java NIO ByteBuffer