AsciiDoc headings should start with an equal sign(=)

pull/869/head
赵禹光 6 years ago
parent 30011ae302
commit 1a89b22d52

@ -1,4 +1,4 @@
## 介绍
== 介绍
Spring Cloud Alibaba 致力于提供微服务开发的一站式解决方案。此项目包含开发分布式应用服务的必需组件,方便开发者通过 Spring Cloud 编程模型轻松使用这些组件来开发分布式应用服务。

@ -1,6 +1,6 @@
== Spring Cloud Alibaba RocketMQ Binder
### RocketMQ 介绍
=== RocketMQ 介绍
https://rocketmq.apache.org[RocketMQ] 是一款开源的分布式消息系统,基于高可用分布式集群技术,提供低延时的、高可靠的消息发布与订阅服务。同时,广泛应用于多个领域,包括异步通信解耦、企业解决方案、金融支付、电信、电子商务、快递物流、广告营销、社交、即时通信、移动应用、手游、视频、物联网、车联网等。
@ -16,7 +16,7 @@ https://rocketmq.apache.org[RocketMQ] 是一款开源的分布式消息系统,
* 亿级消息堆积能力
### RocketMQ 基本使用
=== RocketMQ 基本使用
* 下载 RocketMQ
@ -74,7 +74,7 @@ sh bin/mqshutdown broker
sh bin/mqshutdown namesrv
```
### Spring Cloud Stream 介绍
=== Spring Cloud Stream 介绍
Spring Cloud Stream 是一个用于构建基于消息的微服务应用框架。它基于 SpringBoot 来创建具有生产级别的单机 Spring 应用,并且使用 `Spring Integration` 与 Broker 进行连接。
@ -115,7 +115,7 @@ messageChannel.send(MessageBuilder.withPayload("simple msg").build());
**Spring Cloud Stream 底层基于这段代码去做了各种抽象。**
### 如何使用 Spring Cloud Alibaba RocketMQ Binder ###
=== 如何使用 Spring Cloud Alibaba RocketMQ Binder ###
如果要在您的项目中引入 RocketMQ Binder需要引入如下 maven 依赖:
@ -135,7 +135,7 @@ messageChannel.send(MessageBuilder.withPayload("simple msg").build());
</dependency>
```
### Spring Cloud Alibaba RocketMQ Binder 实现
=== Spring Cloud Alibaba RocketMQ Binder 实现
这是 Spring Cloud Stream RocketMQ Binder 的实现架构:
@ -171,7 +171,7 @@ Message message = builder.build();
output().send(message);
```
### MessageSource 支持
=== MessageSource 支持
SCS RocketMQ Binder 支持 `MessageSource`,可以进行消息的拉取,例子如下:
@ -225,9 +225,9 @@ public class MQApplication {
### 配置选项
=== 配置选项
#### RocketMQ Binder Properties
==== RocketMQ Binder Properties
spring.cloud.stream.rocketmq.binder.name-server::
RocketMQ NameServer 地址(老版本使用 namesrv-addr 配置项)。
@ -251,7 +251,7 @@ spring.cloud.stream.rocketmq.binder.customized-trace-topic::
Default: `RMQ_SYS_TRACE_TOPIC`.
#### RocketMQ Consumer Properties
==== RocketMQ Consumer Properties
下面的这些配置是以 `spring.cloud.stream.rocketmq.bindings.<channelName>.consumer.` 为前缀的 RocketMQ Consumer 相关的配置。
@ -287,7 +287,7 @@ suspendCurrentQueueTimeMillis::
+
默认值: `1000`.
#### RocketMQ Provider Properties
==== RocketMQ Provider Properties
下面的这些配置是以 `spring.cloud.stream.rocketmq.bindings.<channelName>.producer.` 为前缀的 RocketMQ Producer 相关的配置。
@ -336,7 +336,7 @@ retryNextServer::
+
默认值: `false`.
### 阿里云 MQ 服务
=== 阿里云 MQ 服务
使用阿里云 MQ 服务需要配置 AccessKey、SecretKey 以及云上的 NameServer 地址。

@ -1,6 +1,6 @@
== Spring Cloud Alibaba Sentinel
### Sentinel 介绍
=== Sentinel 介绍
随着微服务的流行,服务和服务之间的稳定性变得越来越重要。 https://github.com/alibaba/Sentinel[Sentinel] 以流量为切入点,从流量控制、熔断降级、系统负载保护等多个维度保护服务的稳定性。
@ -11,7 +11,7 @@ https://github.com/alibaba/Sentinel[Sentinel] 具有以下特征:
* *广泛的开源生态* Sentinel 提供开箱即用的与其它开源框架/库的整合模块,例如与 Spring Cloud、Dubbo、gRPC 的整合。您只需要引入相应的依赖并进行简单的配置即可快速地接入 Sentinel。
* *完善的 SPI 扩展点* Sentinel 提供简单易用、完善的 SPI 扩展点。您可以通过实现扩展点,快速的定制逻辑。例如定制规则管理、适配数据源等。
### 如何使用 Sentinel
=== 如何使用 Sentinel
如果要在您的项目中引入 Sentinel使用 group ID 为 `com.alibaba.cloud` 和 artifact ID 为 `spring-cloud-starter-alibaba-sentinel` 的 starter。
@ -75,7 +75,7 @@ public class TestController {
}
```
##### Sentinel 控制台
===== Sentinel 控制台
Sentinel 控制台提供一个轻量级的控制台,它提供机器发现、单机资源实时监控、集群资源汇总,以及规则管理的功能。您只需要对应用进行简单的配置,就可以使用这些功能。
@ -86,7 +86,7 @@ image::https://github.com/alibaba/Sentinel/wiki/image/dashboard.png[]
开启该功能需要3个步骤
###### 获取控制台
====== 获取控制台
您可以从 https://github.com/alibaba/Sentinel/releases[release 页面] 下载最新版本的控制台 jar 包。
@ -96,7 +96,7 @@ image::https://github.com/alibaba/Sentinel/wiki/image/dashboard.png[]
* 使用以下命令将代码打包成一个 fat jar: `mvn clean package`
###### 启动控制台
====== 启动控制台
Sentinel 控制台是一个标准的 SpringBoot 应用,以 SpringBoot 的方式运行 jar 包即可。
@ -106,7 +106,7 @@ java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject
如若8080端口冲突可使用 `-Dserver.port=新端口` 进行设置。
#### 配置控制台信息
==== 配置控制台信息
.application.yml
----
@ -122,7 +122,7 @@ spring:
更多 Sentinel 控制台的使用及问题参考: https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0[Sentinel控制台]
### OpenFeign 支持
=== OpenFeign 支持
Sentinel 适配了 https://github.com/OpenFeign/feign[OpenFeign] 组件。如果想使用,除了引入 `sentinel-starter` 的依赖外还需要 2 个步骤:
@ -163,7 +163,7 @@ NOTE: Feign 对应的接口中的资源名策略定义httpmethod:protocol://r
`EchoService` 接口中方法 `echo` 对应的资源名为 `GET:http://service-provider/echo/{str}`。
### RestTemplate 支持
=== RestTemplate 支持
Spring Cloud Alibaba Sentinel 支持对 `RestTemplate` 的服务调用使用 Sentinel 进行保护,在构造 `RestTemplate` bean的时候需要加上 `@SentinelRestTemplate` 注解。
@ -205,7 +205,7 @@ Sentinel RestTemplate 限流的资源规则提供两种粒度:
NOTE: 以 `https://www.taobao.com/test` 这个 url 并使用 GET 方法为例。对应的资源名有两种粒度,分别是 `GET:https://www.taobao.com` 以及 `GET:https://www.taobao.com/test`
### 动态数据源支持
=== 动态数据源支持
`SentinelProperties` 内部提供了 `TreeMap` 类型的 `datasource` 属性用于配置数据源信息。
@ -253,7 +253,7 @@ NOTE: 默认情况下xml 格式是不支持的。需要添加 `jackson-datafo
关于 Sentinel 动态数据源的实现原理,参考: https://github.com/alibaba/Sentinel/wiki/%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%99%E6%89%A9%E5%B1%95[动态规则扩展]
### Zuul 支持
=== Zuul 支持
https://github.com/alibaba/Sentinel/wiki/%E7%BD%91%E5%85%B3%E9%99%90%E6%B5%81[参考 Sentinel 网关限流]
@ -276,7 +276,7 @@ https://github.com/alibaba/Sentinel/wiki/%E7%BD%91%E5%85%B3%E9%99%90%E6%B5%81[
</dependency>
```
### Spring Cloud Gateway 支持
=== Spring Cloud Gateway 支持
https://github.com/alibaba/Sentinel/wiki/%E7%BD%91%E5%85%B3%E9%99%90%E6%B5%81[参考 Sentinel 网关限流]
@ -299,7 +299,7 @@ https://github.com/alibaba/Sentinel/wiki/%E7%BD%91%E5%85%B3%E9%99%90%E6%B5%81[
</dependency>
```
### Sentinel 对外暴露的 Endpoint
=== Sentinel 对外暴露的 Endpoint
Sentinel 内部提供了一个 Endpoint, 对应的 endpoint id 为 `sentinel`。
@ -403,7 +403,7 @@ Endpoint 暴露的 json 中包含了多种属性:
}
----
### 关于 Sentinel Starter 更多的配置项信息
=== 关于 Sentinel Starter 更多的配置项信息
下表显示当应用的 `ApplicationContext` 中存在对应的Bean的类型时会进行自动化设置

@ -1,4 +1,4 @@
## Introduction
== Introduction
Spring Cloud Alibaba aims to provide a one-stop solution for microservices development. This prjoect includes the required components for developing distributed applications and services, so that developers can develop distributed applications easily with the Spring Cloud programming models.

@ -1,6 +1,6 @@
== Spring Cloud Alibaba RocketMQ Binder
### Introduction of RocketMQ
=== Introduction of RocketMQ
https://rocketmq.apache.org[RocketMQ] is an open-source distributed message system. It is based on highly available distributed cluster technologies and provides message publishing and subscription service with low latency and high stability. RocketMQ is widely used in a variety of industries, such as decoupling of asynchronous communication, enterprise sulotions, financial settlements, telecommunication, e-commerce, logistics, marketing, social media, instant messaging, mobile applications, mobile games, vedios, IoT, and Internet of Vehicles.
@ -16,7 +16,7 @@ It has the following features:
* Billion-level message accumulation capability
### RocketMQ Usages
=== RocketMQ Usages
* Download RocketMQ
@ -74,7 +74,7 @@ sh bin/mqshutdown broker
sh bin/mqshutdown namesrv
```
### Introduction of Spring Cloud Stream
=== Introduction of Spring Cloud Stream
Spring Cloud Stream is a microservice framework used to build architectures based on messages. It helps you to create production-ready single-server Spring applications based on SpringBoot, and connects with Broker using `Spring Integration`.
@ -114,7 +114,7 @@ All the message types in this code are provided by the `spring-messaging`module.
**The lower layer of Spring Cloud Stream also implements various code abstractions based on the previous code.**
### How to use Spring Cloud Alibaba RocketMQ Binder ###
=== How to use Spring Cloud Alibaba RocketMQ Binder ###
For using the Spring Cloud Alibaba RocketMQ Binder, you just need to add it to your Spring Cloud Stream application, using the following Maven coordinates:
@ -134,7 +134,7 @@ Alternatively, you can also use the Spring Cloud Stream RocketMQ Starter:
</dependency>
```
### How Spring Cloud Alibaba RocketMQ Binder Works
=== How Spring Cloud Alibaba RocketMQ Binder Works
This is the implementation architecture of Spring Cloud Stream RocketMQ Binder:
@ -170,7 +170,7 @@ Message message = builder.build();
output().send(message);
```
### Support MessageSource
=== Support MessageSource
SCS RocketMQ Binder support `MessageSource`which can receive messages by pull mode
@ -222,9 +222,9 @@ public class MQApplication {
}
```
### Configuration Options
=== Configuration Options
#### RocketMQ Binder Properties
==== RocketMQ Binder Properties
spring.cloud.stream.rocketmq.binder.name-server::
The name server of RocketMQ Server(Older versions use the namesrv-addr configuration item).
@ -248,7 +248,7 @@ The trace topic for message trace.
Default: `RMQ_SYS_TRACE_TOPIC`.
#### RocketMQ Consumer Properties
==== RocketMQ Consumer Properties
The following properties are available for RocketMQ producers only and must be prefixed with `spring.cloud.stream.rocketmq.bindings.<channelName>.consumer.`.
@ -284,7 +284,7 @@ Time interval of message consume retry for orderly consume.
+
Default: `1000`.
#### RocketMQ Provider Properties
==== RocketMQ Provider Properties
The following properties are available for RocketMQ producers only and must be prefixed with `spring.cloud.stream.rocketmq.bindings.<channelName>.producer.`.

@ -1,6 +1,6 @@
== Spring Cloud Alibaba Sentinel
### Introduction of Sentinel
=== Introduction of Sentinel
As microservices become popular, the stability of service calls is becoming increasingly important. https://github.com/alibaba/Sentinel[Sentinel] takes "flow" as the breakthrough point, and works on multiple fields including flow control, circuit breaking and load protection to protect service reliability.
@ -12,7 +12,7 @@ https://github.com/alibaba/Sentinel[Sentinel] has the following features:
* *Extensive Open-Source Ecosystem* Sentinel provides out-of-box modules that can be easily integrated with other open-source frameworks/libraries, such as Spring Cloud, Dubbo, and gRPC. To use Sentinel, you only need to introduce the related dependency and make a few simple configurations.
* *Sound SPI Extensions* Sentinel provides easy-to-use and sound SPI extension interfaces. You can customize logics with the SPI extensions quickly, for example, you can define your own rule management, or adapt to specific data sources.
### How to Use Sentinel
=== How to Use Sentinel
If you want to use Sentinel in your project, please use the starter with the group ID as `com.alibaba.cloud` and the artifact ID as `spring-cloud-starter-alibaba-sentinel`.
@ -76,7 +76,7 @@ public class TestController {
}
```
##### Sentinel Dashboard
===== Sentinel Dashboard
Sentinel dashboard is a lightweight console that provides functions such as machine discovery, single-server resource monitoring, overview of cluster resource data, as well as rule management. To use these features, you only need to complete a few steps.
@ -87,7 +87,7 @@ image::https://github.com/alibaba/Sentinel/wiki/image/dashboard.png[]
To use the Sentinel dashboard, simply complete the following 3 steps.
###### Get the Dashboard
====== Get the Dashboard
You can download the latest dashboard JAR file from the https://github.com/alibaba/Sentinel/releases[Release Page].
@ -97,7 +97,7 @@ You can also get the latest source code to build your own Sentinel dashboard
* Run the following command to package the code into a FatJar: `mvn clean package`
###### Start the Dashboard
====== Start the Dashboard
Sentinel dashboard is a standard SpringBoot application, and you can run the JAR file in the Spring Boot mode.
@ -107,7 +107,7 @@ java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject
If there is conflict with the 8080 port, you can use `-Dserver.port=new port` to define a new port.
#### Configure the Dashboard
==== Configure the Dashboard
.application.yml
----
@ -123,7 +123,7 @@ The port number specified in `spring.cloud.sentinel.transport.port` will start a
For more information about Sentinel dashboard, please refer to https://github.com/alibaba/Sentinel/wiki/%E6%8E%A7%E5%88%B6%E5%8F%B0[Sentinel Dashboard].
### OpenFeign Support
=== OpenFeign Support
Sentinel is compatible with the https://github.com/OpenFeign/feign[OpenFeign] component. To use it, in addition to introducing the `sentinel-starter` dependency, complete the following 2 steps:
@ -164,7 +164,7 @@ NOTE: The resource name policy in the corresponding interface of Feign ishttp
The corresponding resource name of the `echo` method in the `EchoService` interface is `GET:http://service-provider/echo/{str}`.
### RestTemplate Support
=== RestTemplate Support
Spring Cloud Alibaba Sentinel supports the protection of `RestTemplate` service calls using Sentinel. To do this, you need to add the `@SentinelRestTemplate` annotation when constructing the `RestTemplate` bean.
@ -208,7 +208,7 @@ Sentinel RestTemplate provides two granularities for resource rate limiting:
NOTE: Take Http GET `https://www.taobao.com/test` as an example. The corresponding resource names have two levels of granularities, `GET:https://www.taobao.com` and `GET:https://www.taobao.com/test`.
### Dynamic Data Source Support
=== Dynamic Data Source Support
`SentinelProperties` provide `datasource` attribute to configure datasource.
@ -253,7 +253,7 @@ NOTE: XML format is not supported by default. To make it effective, you need to
To learn more about how dynamic data sources work in Sentinel, refer to https://github.com/alibaba/Sentinel/wiki/%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%99%E6%89%A9%E5%B1%95[Dynamic Rule Extension].
### Support Zuul
=== Support Zuul
https://github.com/alibaba/Sentinel/wiki/%E7%BD%91%E5%85%B3%E9%99%90%E6%B5%81[参考 Sentinel 网关限流]
@ -276,7 +276,7 @@ If you want to use Sentinel Starter with Zuul, you need to add the `spring-cloud
</dependency>
```
### Support Spring Cloud Gateway
=== Support Spring Cloud Gateway
https://github.com/alibaba/Sentinel/wiki/%E7%BD%91%E5%85%B3%E9%99%90%E6%B5%81[参考 Sentinel 网关限流]
@ -299,7 +299,7 @@ If you want to use Sentinel Starter with Spring Cloud Gateway, you need to add t
</dependency>
```
### Sentinel Endpoint
=== Sentinel Endpoint
Sentinel provides an Endpoint internally with a corresponding endpoint id of `sentinel`.
@ -402,7 +402,7 @@ The followings shows how a service instance accesses the Endpoint:
}
----
### Configuration
=== Configuration
The following table shows that when there are corresponding bean types in `ApplicationContext`, some actions will be taken:

Loading…
Cancel
Save