dubbo服务者配置说明
<?xml version="1.0" encoding="UTF-8"?>
<!-- - Copyright 1999-2011 Alibaba Group. - - Licensed under the Apache License,
Version 2.0 (the "License"); - you may not use this file except in compliance
with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0
- - Unless required by applicable law or agreed to in writing, software -
distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the
License for the specific language governing permissions and - limitations
under the License. -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> <!-- 引入spring配置 -->
<import resource="applicationContext.xml" />
<!-- 具体服务实现bean -->
<bean id="userService" class="com.heli.user.service.impl.UserServiceImpl" />
<!-- 将服务service封装成可以对外开放的服务, 同时提供负载均衡算法,loadbalance可选有random,roundrobin(轮询) -->
<!--service中加入 mock="return null"当service所有都挂掉以后,client调用时自动获取到return null -->
<!--service中加入 actives="10" 表示限制所有服务在每个客户端调用都不能同时超过10个 -->
<!--service中加入 executes="10" 表示限制所有服务在每个服务器端被调用都不能同时超过10个 -->
<!-- 可以在service中加入内部标签 <dubbo:method name="sayHello" actives="10" />来控制每个方法的执行并发个数 -->
<!-- timeout="300" retry="2" 超时时间300 重试2次 -->
<!-- owner=”WangHeping,Guoyong”该服务的负责人 -->
<dubbo:service interface="com.heli.user.service.IUserService" ref="userService" loadbalance="roundrobin" />
<!-- 提供方应用信息,用于计算依赖关系,不要与消费方一样 -->
<dubbo:application name="MyFirstDubboProvider" />
<!-- 使用multicast广播注册中心暴露服务地址 <dubbo:registry address="multicast://224.5.6.7:1234"
/> -->
<!-- 使用zookeeper注册中心暴露服务地址 -->
<dubbo:registry address="zookeeper://192.168.1.244:2181" />
<!-- 用dubbo协议在20880端口暴露服务 ,注意不能与其他服务端口相同 -->
<!-- dispatcher all所有请求都发到线程池处理,threadpool fixed固定线程池大小,初始化后不进行伸缩,threads 线程池内线程个数 -->
<!-- <dubbo:protocol accesslog="true" />开启访问日志记录 -->
<!-- <dubbo:protocol accesslog="http://10.20.160.198/wiki/display/dubbo/foo/bar.log" />规定访问日志的路径 -->
<!-- <dubbo:protocol name="dubbo" connections="2" accepts="1000"/> dubbo协议使用长连接和nio,这里connections=2表示同时建立两个长连接(要在provier和consumer同时写上)
accepts=1000 表示为了防止同时过来大量连接而被干掉,限制最大为1000-->
<dubbo:protocol name="dubbo" port="20880" dispatcher="all" threadpool="fixed" threads="100" /> </beans>
dubbo服务者配置说明的更多相关文章
- Spring Boot Logback应用日志
e Spring Boot Logback应用日志 2015-09-08 19:57 7673人阅读 评论(0) 收藏 举报 . 分类: Spring Boot(51) . 目录(?)[+] 日志对于 ...
- Dubbo 2.7.1 踩坑记
Dubbo 2.7 版本增加新特性,新系统开始使用 Dubbo 2.7.1 尝鲜新功能.使用过程中不慎踩到这个版本的 Bug. 系统架构 Spring Boot 2.14-Release + Dubb ...
- Dubbo+Zookeeper的简单入门案例
1.1 Dubbo简介 Apache Dubbo是一款高性能的Java RPC框架.其前身是阿里巴巴公司开源的一个高性能.轻量级的开源Java RPC框架,可以和Spring框架无缝集成. 什么是R ...
- 10 Dubbo 配置实战
Dubbo 配置实战 快速入门 dubbo 建议看这篇文章是在学习了快速入门 dubbo 那篇文章的基础上来学习 配置说明 文档地址 https://dubbo.apache.org/zh/index ...
- Dubbo源码(六) - 服务路由
前言 本文基于Dubbo2.6.x版本,中文注释版源码已上传github:xiaoguyu/dubbo 今天,来聊点短的,服务路由Router,本文讲的是路由的调用路径,不讲路由的规则解析.想了解规则 ...
- ZooKeeper 相关概念以及使用小结
Dubbo 通过注册中心在分布式环境中实现服务的注册与发现,而注册中心通常采用 ZooKeeper,研究注册中心相关源码绕不开 ZooKeeper,所以学习了 ZooKeeper 的基本概念以及相关 ...
- Java自学路线图之Java框架自学
Java自学路线图的框架分为两个阶段,第一阶段的Java框架包含六个内容:MyBatis,Spring,SpringMVC,Maven高级,Git,Dubbo. 在Java自学过程中掌握框架的使用,对 ...
- k8s-2-集成apollo配置中心
主题: 在k8s中集成Apollo配置中心 架构图 一.配置中心概述 配置的几种方式 本课讲得是基于配置中心数据库实现 配置管理的现状 常见的配置中心 主讲:k8s configmap,apollo ...
- dubbo在idea下的使用创建 服务者,消费者 注册中心
1.基于windows 下 spring 下的dubbo 需要书写配置文件 (1).创建带有web工程的项目 创建一个服务者 package cn.edu.aynu.bean; import lo ...
随机推荐
- CKEditor + CKFinder 实现编辑上传图片配置 (二)
CKEditor + CKFinder 实现编辑上传图片配置 (二) 上传图片时,如果上传的图片过大,默认情况情况下回自动裁剪,代码如图 \ckfinder\config.php 目录下的配置文件co ...
- mybaitis配置信息
在配置mybatis当中,jdbcType的名称要大写,时间类型DATE只能传入年月日,要想传入时分秒,应该使用TIMESTAMP http://www.blogjava.net/hello-yun/ ...
- struts1标签(html:text)
这个标签可能是出现频率最高的标签了. 功能: <html:text/>产生HTML语句: <input type=”text”…> 也就是在页面上产生input类型的显示标签. ...
- 本地搭建php环境
AppServ 是 PHP 网页架站工具组合包,所包含的软件有:Apache[.Apache Monitor.PHP.MySQL.phpMyAdmin等,如果您的本地机器没有安装过php.mysql等 ...
- Const #define
(1) 指针本身是常量不可变 (char*) const pContent;const (char*) pContent; (2) 指针所指向的内容是常量不可变 const (char) *pCont ...
- latex 常用小结
在写论文,甚至有些课程的报告的时候,latex是常用的工具.这篇博文简单的记录了latex常用的一些内容. 1 基本模块 没用过latex的读者,最想问的问题莫过于latex的 “hello worl ...
- Radio Checkbox Select 操作
一个小总结 <!DOCTYPE html> <html> <head> <meta name="description" content= ...
- 一步一步Asp.Net MVC系列_权限管理总结(附MVC权限管理系统源码)
在上一节中我们总结了关于权限控制的方式,我们这一节讲解关于权限控制中角色权限的授予处理等等并做本系列的总结. 首先,我们来谈谈权限控制中角色权限的控制,上一节只是针对权限拦截中比较粗的控制,如果我们需 ...
- Nitrous.IO融资665万美元 帮助开发者省去配置调试等工作-CSDN.NET
Intro to Computer Science Class Online (CS101) - Udacity Building a Search Engine Nitrous.IO融资665万美元 ...
- HTML本地存储,localstorg的应用实例
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...