Quellcode durchsuchen

Add docs for pulsar.

master
Savorboard vor 3 Jahren
Ursprung
Commit
3aaff40e46
5 geänderte Dateien mit 119 neuen und 31 gelöschten Zeilen
  1. +2
    -1
      docs/content/user-guide/en/transport/general.md
  2. +42
    -0
      docs/content/user-guide/en/transport/pulsar.md
  3. +1
    -0
      docs/content/user-guide/zh/transport/general.md
  4. +43
    -0
      docs/content/user-guide/zh/transport/pulsar.md
  5. +31
    -30
      docs/mkdocs.yml

+ 2
- 1
docs/content/user-guide/en/transport/general.md Datei anzeigen

@@ -13,6 +13,7 @@ CAP supports several transport methods:
* [NATS](nats.md)
* [In-Memory Queue](in-memory-queue.md)
* [Redis Streams](redis-streams.md)
* [Apache Pulsar](pulsar.md)

## How to select a transport

@@ -30,7 +31,7 @@ CAP supports several transport methods:
>`Kafka` vs `RabbitMQ` :
> https://stackoverflow.com/questions/42151544/is-there-any-reason-to-use-rabbitmq-over-kafka

## Community-supported extensions
## Community-supported transport extensions

Thanks to the community for supporting CAP, the following is the implementation of community-supported transport



+ 42
- 0
docs/content/user-guide/en/transport/pulsar.md Datei anzeigen

@@ -0,0 +1,42 @@
# Apache Pulsar

[Apache Pulsar](https://pulsar.apache.org/) is a cloud-native, distributed messaging and streaming platform originally created at Yahoo! and now a top-level Apache Software Foundation project.

Pulsar can be used in CAP as a message transporter.

## Configuration

To use Pulsar transporter, you need to install the following package from NuGet:

```powershell
PM> Install-Package DotNetCore.CAP.Pulsar

```

Then you can add configuration items to the `ConfigureServices` method of `Startup.cs`.

```csharp

public void ConfigureServices(IServiceCollection services)
{
// ...

services.AddCap(x =>
{
x.UsePulsar(opt => {
//Pulsar options
});
// x.UseXXX ...
});
}

```

#### Pulsar Options

The Pulsar configuration parameters provided directly by the CAP:

NAME | DESCRIPTION | TYPE | DEFAULT
:---|:---|---|:---
ServiceUrl | Broker server address | string |
TlsOptions | Tls configuration | object |

+ 1
- 0
docs/content/user-guide/zh/transport/general.md Datei anzeigen

@@ -13,6 +13,7 @@ CAP 支持以下几种运输方式:
* [NATS](nats.md)
* [In-Memory Queue](in-memory-queue.md)
* [Redis Streams](redis-streams.md)
* [Apache Pulsar](pulsar.md)

## 怎么选择运输器



+ 43
- 0
docs/content/user-guide/zh/transport/pulsar.md Datei anzeigen

@@ -0,0 +1,43 @@
# Apache Pulsar

[Apache Pulsar](https://pulsar.apache.org/) 是一个用于服务器到服务器的消息系统,具有多租户、高性能等优势。 Pulsar 最初由 Yahoo 开发,目前由 Apache 软件基金会管理。

CAP 支持使用 Apache Pulsar 作为消息传输器。

## Configuration

要使用 Pulsar 作为消息传输器,你需要从 NuGet 安装以下扩展包:

```shell

Install-Package DotNetCore.CAP.Pulsar

```

然后,你可以在 `Startup.cs` 的 `ConfigureServices` 方法中添加基于 Pulsar 的配置项。

```csharp

public void ConfigureServices(IServiceCollection services)
{
// ...

services.AddCap(x =>
{
x.UsePulsar(opt => {
//Pulsar Options
});
// x.UseXXX ...
});
}

```

#### Pulsar Options

CAP 直接对外提供的 Pulsar 配置参数如下:

NAME | DESCRIPTION | TYPE | DEFAULT
:---|:---|---|:---
ServiceUrl | Broker 地址 | string |
TlsOptions | TLS 配置项 | object |

+ 31
- 30
docs/mkdocs.yml Datei anzeigen

@@ -4,31 +4,30 @@ site_url: http://cap.dotnetcore.xyz
site_description: A distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern.
site_author: CAP Team

repo_name: 'GitHub'
repo_url: 'https://github.com/dotnetcore/CAP'
edit_uri: 'edit/master/docs/content'
docs_dir: 'content'
repo_name: "GitHub"
repo_url: "https://github.com/dotnetcore/CAP"
edit_uri: "edit/master/docs/content"
docs_dir: "content"

# Copyright
copyright: Copyright &copy; 2021 <a href="https://github.com/dotnetcore">NCC</a>, Maintained by the <a href="/about/contact-us/#cap-team">CAP Team</a>.


#theme: material
theme:
name: 'material'
name: "material"
palette:
primary: 'deep purple'
accent: 'indigo'
primary: "deep purple"
accent: "indigo"
language: en
include_sidebar: true
logo: 'img/logo.svg'
favicon: 'img/favicon.ico'
logo: "img/logo.svg"
favicon: "img/favicon.ico"
features:
- navigation.tabs
- navigation.instant
i18n:
prev: 'Previous'
next: 'Next'
prev: "Previous"
next: "Next"

#Customization
extra:
@@ -40,12 +39,12 @@ extra:
link: /user-guide/zh/getting-started/quick-start
lang: zh
social:
- icon: 'fontawesome/brands/github'
link: 'https://github.com/dotnetcore/CAP'
- icon: 'fontawesome/brands/twitter'
link: 'https://twitter.com/ncc_community'
- icon: 'fontawesome/brands/weibo'
link: 'https://weibo.com/dotnetcore'
- icon: "fontawesome/brands/github"
link: "https://github.com/dotnetcore/CAP"
- icon: "fontawesome/brands/twitter"
link: "https://twitter.com/ncc_community"
- icon: "fontawesome/brands/weibo"
link: "https://weibo.com/dotnetcore"

# Extensions
markdown_extensions:
@@ -80,12 +79,12 @@ markdown_extensions:
- pymdownx.tilde

nav:
- Home: index.md
- Documentation:
- Home: index.md
- Documentation:
- Getting Started:
- Quick Start: user-guide/en/getting-started/quick-start.md
- Introduction: user-guide/en/getting-started/introduction.md
- Contributing: user-guide/en/getting-started/contributing.md
- Contributing: user-guide/en/getting-started/contributing.md
- CAP:
- Configuration: user-guide/en/cap/configuration.md
- Messaging: user-guide/en/cap/messaging.md
@@ -94,9 +93,10 @@ nav:
- Transactions: user-guide/en/cap/transactions.md
- Idempotence: user-guide/en/cap/idempotence.md
- Transport:
- General: user-guide/en/transport/general.md
- General: user-guide/en/transport/general.md
- Amazon SQS: user-guide/en/transport/aws-sqs.md
- Apache Kafka®: user-guide/en/transport/kafka.md
- Apache Pulsar: user-guide/en/transport/pulsar.md
- Azure Service Bus: user-guide/en/transport/azure-service-bus.md
- NATS: user-guide/en/transport/nats.md
- RabbitMQ: user-guide/en/transport/rabbitmq.md
@@ -117,22 +117,23 @@ nav:
- Github: user-guide/en/samples/github.md
- eShopOnContainers: user-guide/en/samples/eshoponcontainers.md
- FAQ: user-guide/en/samples/faq.md
- 文档(中文):
- 文档(中文):
- 入门:
- 快速开始: user-guide/zh/getting-started/quick-start.md
- 介绍: user-guide/zh/getting-started/introduction.md
- 贡献: user-guide/zh/getting-started/contributing.md
- 贡献: user-guide/zh/getting-started/contributing.md
- CAP:
- 配置: user-guide/zh/cap/configuration.md
- 消息: user-guide/zh/cap/messaging.md
- 过滤器: user-guide/zh/cap/filter.md
- 序列化: user-guide/zh/cap/serialization.md
- 事务: user-guide/zh/cap/transactions.md
- 幂等性: user-guide/zh/cap/idempotence.md
- 幂等性: user-guide/zh/cap/idempotence.md
- 传输:
- 简介: user-guide/zh/transport/general.md
- Amazon SQS: user-guide/zh/transport/aws-sqs.md
- Apache Kafka®: user-guide/zh/transport/kafka.md
- 简介: user-guide/zh/transport/general.md
- Amazon SQS: user-guide/zh/transport/aws-sqs.md
- Apache Kafka®: user-guide/zh/transport/kafka.md
- Apache Pulsar: user-guide/zh/transport/pulsar.md
- Azure Service Bus: user-guide/zh/transport/azure-service-bus.md
- NATS: user-guide/zh/transport/nats.md
- RabbitMQ: user-guide/zh/transport/rabbitmq.md
@@ -155,7 +156,7 @@ nav:
- Github: user-guide/zh/samples/github.md
- eShopOnContainers: user-guide/zh/samples/eshoponcontainers.md
- FAQ: user-guide/zh/samples/faq.md
- About:
- About:
- Contact Us: about/contact-us.md
- Release Notes: about/release-notes.md
- License: about/license.md
@@ -163,4 +164,4 @@ nav:
# Google Analytics
google_analytics:
- !!python/object/apply:os.getenv ["GOOGLE_ANALYTICS_KEY"]
- auto
- auto

Laden…
Abbrechen
Speichern