This is an automated email from the ASF dual-hosted git repository.
urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new 4937fbba965 Docs sync done from apache/pulsar(#545f33f)
4937fbba965 is described below
commit 4937fbba965eaac656f43aefafba108f90427d2e
Author: Pulsar Site Updater <[email protected]>
AuthorDate: Wed Nov 16 12:01:15 2022 +0000
Docs sync done from apache/pulsar(#545f33f)
---
site2/website-next/docs/client-libraries-cpp.md | 96 +++++++++++-----------
site2/website-next/docs/client-libraries-dotnet.md | 24 +++---
site2/website-next/docs/client-libraries-go.md | 56 +++++++------
site2/website-next/docs/client-libraries-node.md | 28 +++----
site2/website-next/docs/client-libraries-python.md | 12 +--
.../docs/client-libraries-websocket.md | 23 +++---
site2/website-next/docs/client-libraries.md | 2 +-
7 files changed, 128 insertions(+), 113 deletions(-)
diff --git a/site2/website-next/docs/client-libraries-cpp.md
b/site2/website-next/docs/client-libraries-cpp.md
index ee8b657d81d..11ae9383d78 100644
--- a/site2/website-next/docs/client-libraries-cpp.md
+++ b/site2/website-next/docs/client-libraries-cpp.md
@@ -9,9 +9,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
````
-You can use a Pulsar C++ client to create producers, consumers, and readers.
For complete examples, refer to [C++ client
examples](https://github.com/apache/pulsar-client-cpp/tree/main/examples).
-
-All the methods in producer, consumer, and reader of a C++ client are
thread-safe. You can read the [API docs](@pulsar:apidoc:cpp@) for the C++
client.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
For Pulsar features that C++ clients support, see [Client Feature
Matrix](https://docs.google.com/spreadsheets/d/1YHYTkIXR8-Ql103u-IMI18TXLlGStK8uJjDsOOA0T20/edit#gid=1784579914).
For complete examples, refer to [C++ client
examples](https://github.com/apache/pulsar-client-cpp/tree/main/examples).
## Installation
@@ -29,32 +27,32 @@ brew install libpulsar
1. Download any one of the Deb packages:
-<Tabs>
-<TabItem value="client">
+ <Tabs>
+ <TabItem value="client">
-```bash
-wget @pulsar:deb:client@
-```
+ ```bash
+ wget @pulsar:deb:client@
+ ```
-This package contains shared libraries `libpulsar.so` and `libpulsarnossl.so`.
+ This package contains shared libraries `libpulsar.so` and
`libpulsarnossl.so`.
-</TabItem>
-<TabItem value="client-devel">
+ </TabItem>
+ <TabItem value="client-devel">
-```bash
-wget @pulsar:deb:client-devel@
-```
+ ```bash
+ wget @pulsar:deb:client-devel@
+ ```
-This package contains static libraries: `libpulsar.a`, `libpulsarwithdeps.a`
and C/C++ headers.
+ This package contains static libraries: `libpulsar.a`,
`libpulsarwithdeps.a`, and C/C++ headers.
-</TabItem>
-</Tabs>
+ </TabItem>
+ </Tabs>
2. Install the package using the following command:
-```bash
-apt install ./apache-pulsar-client*.deb
-```
+ ```bash
+ apt install ./apache-pulsar-client*.deb
+ ```
Now, you can see Pulsar C++ client libraries installed under the `/usr/lib`
directory.
@@ -62,41 +60,41 @@ Now, you can see Pulsar C++ client libraries installed
under the `/usr/lib` dire
1. Download any one of the RPM packages:
-<Tabs>
-<TabItem value="client">
+ <Tabs>
+ <TabItem value="client">
-```bash
-wget @pulsar:dist_rpm:client@
-```
+ ```bash
+ wget @pulsar:dist_rpm:client@
+ ```
-This package contains shared libraries: `libpulsar.so` and `libpulsarnossl.so`.
+ This package contains shared libraries: `libpulsar.so` and
`libpulsarnossl.so`.
-</TabItem>
-<TabItem value="client-debuginfo">
+ </TabItem>
+ <TabItem value="client-debuginfo">
-```bash
-wget @pulsar:dist_rpm:client-debuginfo@
-```
+ ```bash
+ wget @pulsar:dist_rpm:client-debuginfo@
+ ```
-This package contains debug symbols for `libpulsar.so`.
+ This package contains debug symbols for `libpulsar.so`.
-</TabItem>
-<TabItem value="client-devel">
+ </TabItem>
+ <TabItem value="client-devel">
-```bash
-wget @pulsar:dist_rpm:client-devel@
-```
+ ```bash
+ wget @pulsar:dist_rpm:client-devel@
+ ```
-This package contains static libraries: `libpulsar.a`, `libpulsarwithdeps.a`
and C/C++ headers.
+ This package contains static libraries: `libpulsar.a`,
`libpulsarwithdeps.a` and C/C++ headers.
-</TabItem>
-</Tabs>
+ </TabItem>
+ </Tabs>
2. Install the package using the following command:
-```bash
-rpm -ivh apache-pulsar-client*.rpm
-```
+ ```bash
+ rpm -ivh apache-pulsar-client*.rpm
+ ```
Now, you can see Pulsar C++ client libraries installed under the `/usr/lib`
directory.
@@ -106,10 +104,6 @@ If you get an error like "libpulsar.so: cannot open shared
object file: No such
:::
-### Source
-
-For how to build Pulsar C++ client on different platforms from source code,
see [compliation](https://github.com/apache/pulsar-client-cpp#compilation).
-
## Connection URLs
To connect to Pulsar using client libraries, you need to specify a [Pulsar
protocol](developing-binary-protocol.md) URL.
@@ -132,6 +126,14 @@ If you use [TLS](security-tls-authentication.md)
authentication, add `+ssl` in t
pulsar+ssl://pulsar.us-west.example.com:6651
```
+## API reference
+
+All the methods in producer, consumer, and reader of Pulsar C++ clients are
thread-safe. See the [API docs](@pulsar:apidoc:cpp@) for more details.
+
+## Release notes
+
+For the changelog of Pulsar C++ clients, see [release
notes](/release-notes/#c).
+
## Create a producer
To use Pulsar as a producer, you need to create a producer on the C++ client.
There are two main ways of using a producer:
diff --git a/site2/website-next/docs/client-libraries-dotnet.md
b/site2/website-next/docs/client-libraries-dotnet.md
index 0401b578fe4..b0ed1325539 100644
--- a/site2/website-next/docs/client-libraries-dotnet.md
+++ b/site2/website-next/docs/client-libraries-dotnet.md
@@ -4,21 +4,21 @@ title: Pulsar C# client
sidebar_label: "C#"
---
-You can use the Pulsar C# client (DotPulsar) to create Pulsar producers and
consumers in C#. All the methods in the producer, consumer, and reader of a C#
client are thread-safe. The official documentation for DotPulsar is available
[here](https://github.com/apache/pulsar-dotpulsar/wiki).
+You can use the Pulsar C# client (DotPulsar) to create Pulsar producers,
consumers, and readers in C#. For Pulsar features that C# clients support, see
[Pulsar Feature
Matrix](https://docs.google.com/spreadsheets/d/1YHYTkIXR8-Ql103u-IMI18TXLlGStK8uJjDsOOA0T20/edit#gid=1784579914).
-## Installation
+All the methods in the producer, consumer, and reader of a C# client are
thread-safe. The official documentation for DotPulsar is available
[here](https://github.com/apache/pulsar-dotpulsar/wiki).
-You can install the Pulsar C# client library either through the dotnet CLI or
through Visual Studio. This section describes how to install the Pulsar C#
client library through the dotnet CLI. For information about how to install the
Pulsar C# client library through Visual Studio, see
[here](https://docs.microsoft.com/en-us/visualstudio/mac/nuget-walkthrough?view=vsmac-2019).
+## Installation
-### Prerequisites
+This section describes how to install the Pulsar C# client library through the
dotnet CLI.
-Install the [.NET Core SDK](https://dotnet.microsoft.com/download/), which
provides the dotnet command-line tool. Starting in Visual Studio 2017, the
dotnet CLI is automatically installed with any .NET Core related workloads.
+Alternatively, you can install the Pulsar C# client library through Visual
Studio. Note that starting from Visual Studio 2017, the dotnet CLI is
automatically installed with any .NET Core related workloads. For more
information, see [Microsoft
documentation](https://docs.microsoft.com/en-us/visualstudio/mac/nuget-walkthrough?view=vsmac-2019).
-### Procedures
+To install the Pulsar C# client library using the dotnet CLI, follow these
steps:
-To install the Pulsar C# client library, follow these steps:
+1. Install the [.NET Core SDK](https://dotnet.microsoft.com/download/), which
provides the dotnet CLI.
-1. Create a project.
+2. Create a project.
1. Create a folder for the project.
@@ -32,7 +32,7 @@ To install the Pulsar C# client library, follow these steps:
4. Use `dotnet run` to test that the app has been created properly.
-2. Add the DotPulsar NuGet package.
+3. Add the DotPulsar NuGet package.
1. Use the following command to install the `DotPulsar` package.
@@ -70,6 +70,10 @@ If you use [TLS](security-tls-authentication.md)
authentication, add `+ssl` in t
pulsar+ssl://pulsar.us-west.example.com:6651
```
+## Release notes
+
+For the changelog of Pulsar C# clients, see [release
notes](/release-notes/#c-1).
+
## Client
This section describes some configuration examples for the Pulsar C# client.
@@ -212,7 +216,7 @@ If you have followed [Authentication using
TLS](security-tls-authentication.md),
A producer is a process that attaches to a topic and publishes messages to a
Pulsar broker for processing. This section describes some configuration
examples of the producer.
-## Send data
+### Send data
This example shows how to send data.
diff --git a/site2/website-next/docs/client-libraries-go.md
b/site2/website-next/docs/client-libraries-go.md
index 14b331409ce..8b8f2260b3c 100644
--- a/site2/website-next/docs/client-libraries-go.md
+++ b/site2/website-next/docs/client-libraries-go.md
@@ -4,42 +4,42 @@ title: Pulsar Go client
sidebar_label: "Go"
---
-You can use Pulsar [Go client](https://github.com/apache/pulsar-client-go) to
create Pulsar [producers](#producers), [consumers](#consumers), and
[readers](#readers) in Golang.
-
-API docs are available on the
[Godoc](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar) page
+You can use a Pulsar [Go client](https://github.com/apache/pulsar-client-go)
to create Pulsar [producers](#producers), [consumers](#consumers), and
[readers](#readers) in Golang. For Pulsar features that Go clients support, see
[Client Feature
Matrix](https://docs.google.com/spreadsheets/d/1YHYTkIXR8-Ql103u-IMI18TXLlGStK8uJjDsOOA0T20/edit#gid=1784579914).
## Installation
-### Install go package
+You can install the `pulsar` library by using either `go get` or `go module`.
-You can get the `pulsar` library by using `go get` or use it with `go module`.
+### Use `go get`
-Download the library of Go client to your local environment:
+1. Download the library of Go client to your local environment:
-```bash
-go get -u "github.com/apache/pulsar-client-go/pulsar"
-```
+ ```bash
+ go get -u "github.com/apache/pulsar-client-go/pulsar"
+ ```
-Once installed locally, you can import it into your project:
+2. Import it into your project:
-```go
-import "github.com/apache/pulsar-client-go/pulsar"
-```
+ ```go
+ import "github.com/apache/pulsar-client-go/pulsar"
+ ```
-Use with go module:
+### Use `go module`
-```bash
-mkdir test_dir && cd test_dir
-```
+1. Create a directory named `test_dir` and change your working directory to it.
-Write a sample script in the `test_dir` directory (such as `test_example.go`)
and write `package main` at the beginning of the file.
+ ```bash
+ mkdir test_dir && cd test_dir
+ ```
-```bash
-go mod init test_dir
-go mod tidy && go mod download
-go build test_example.go
-./test_example
-```
+2. Write a sample script (such as `test_example.go`) in the `test_dir`
directory and write `package main` at the beginning of the file.
+
+ ```bash
+ go mod init test_dir
+ go mod tidy && go mod download
+ go build test_example.go
+ ./test_example
+ ```
## Connection URLs
@@ -63,6 +63,14 @@ If you use [TLS](security-tls-authentication.md)
authentication, add `+ssl` in t
pulsar+ssl://pulsar.us-west.example.com:6651
```
+## API reference
+
+API docs are available on the
[Godoc](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar) page.
+
+## Release notes
+
+For the changelog of Pulsar Go clients, see [release
notes](/release-notes/#go).
+
## Create a client
To interact with Pulsar, you need a
[`Client`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#Client)
object first. You can create a client object using the
[`NewClient`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#NewClient)
function, passing in a
[`ClientOptions`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ClientOptions)
object. Here's an example:
diff --git a/site2/website-next/docs/client-libraries-node.md
b/site2/website-next/docs/client-libraries-node.md
index 3986203dc2d..33715f7d774 100644
--- a/site2/website-next/docs/client-libraries-node.md
+++ b/site2/website-next/docs/client-libraries-node.md
@@ -4,29 +4,21 @@ title: The Pulsar Node.js client
sidebar_label: "Node.js"
---
-The Pulsar Node.js client can be used to create Pulsar
[producers](#producers), [consumers](#consumers), and [readers](#readers) in
Node.js.
-
-All the methods in [producers](#producers), [consumers](#consumers), and
[readers](#readers) of a Node.js client are thread-safe.
+You can use a Pulsar Node.js client to create producers, consumers, and
readers. For Pulsar features that Python clients support, see [Client Feature
Matrix](https://docs.google.com/spreadsheets/d/1YHYTkIXR8-Ql103u-IMI18TXLlGStK8uJjDsOOA0T20/edit#gid=1784579914).
For 1.3.0 or later versions, [type
definitions](https://github.com/apache/pulsar-client-node/blob/master/index.d.ts)
used in TypeScript are available.
## Installation
-You can install the
[`pulsar-client`](https://www.npmjs.com/package/pulsar-client) library via
[npm](https://www.npmjs.com/).
-
-### Requirements
-Pulsar Node.js client library is based on the C++ client library.
-Follow [these instructions](client-libraries-cpp.md#compilation) and install
the Pulsar C++ client library.
-
-### Compatibility
-
-Compatibility between each version of the Node.js client and the C++ client is
listed on
[github](https://github.com/apache/pulsar-client-node/blob/master/README.md).
+:::tip
-If an incompatible version of the C++ client is installed, you may fail to
build or run this library.
+Pulsar Node.js client library is based on the C++ client library.
+* You must install the Pulsar C++ client library before installing a Node.js
client. For more details, see [instructions](client-libraries-cpp.md).
+* If an incompatible version of the C++ client is installed, you may fail to
build or run the Node.js library. For the compatibility between each version of
the Node.js client and the C++ client, see
[README](https://github.com/apache/pulsar-client-node/blob/master/README.md).
-### Installation using npm
+:::
-Install the `pulsar-client` library via [npm](https://www.npmjs.com/):
+Install the [`pulsar-client`](https://www.npmjs.com/package/pulsar-client)
library via [npm](https://www.npmjs.com/):
```shell
npm install pulsar-client
@@ -34,7 +26,7 @@ npm install pulsar-client
:::note
-Also, this library works only in Node.js 10.x or later because it uses the
[`node-addon-api`](https://github.com/nodejs/node-addon-api) module to wrap the
C++ library.
+This library only works in Node.js 10.x or later versions because it uses the
[`node-addon-api`](https://github.com/nodejs/node-addon-api) module to wrap the
C++ library.
:::
@@ -60,6 +52,10 @@ If you use [TLS](security-tls-authentication.md)
authentication, add `+ssl` in t
pulsar+ssl://pulsar.us-west.example.com:6651
```
+## Release notes
+
+For the changelog of Pulsar Node.js clients, see [release
notes](/release-notes/#nodejs).
+
## Create a client
To interact with Pulsar, you first need a client object. You can create a
client instance using a `new` operator and the `Client` method, passing in a
client options object (more on configuration [below](#client-configuration)).
diff --git a/site2/website-next/docs/client-libraries-python.md
b/site2/website-next/docs/client-libraries-python.md
index c3e41e6aac2..3c17c2e519c 100644
--- a/site2/website-next/docs/client-libraries-python.md
+++ b/site2/website-next/docs/client-libraries-python.md
@@ -9,9 +9,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
````
-You can use a Pulsar Python client to create producers, consumers, and readers.
-
-All the methods in producer, consumer, and reader of a Python client are
thread-safe. You can read the [API docs](@pulsar:apidoc:python@) for the Python
client.
+You can use a Pulsar Python client to create producers, consumers, and
readers. For Pulsar features that Python clients support, see [Client Feature
Matrix](https://docs.google.com/spreadsheets/d/1YHYTkIXR8-Ql103u-IMI18TXLlGStK8uJjDsOOA0T20/edit#gid=1784579914).
## Installation
@@ -63,9 +61,13 @@ If you use [TLS](security-tls-authentication.md)
authentication, add `+ssl` in t
pulsar+ssl://pulsar.us-west.example.com:6651
```
-## API Reference
+## API reference
+
+All the methods in producer, consumer, and reader of Pulsar Python clients are
thread-safe. See the [API docs](@pulsar:apidoc:python@) for more details.
+
+## Release notes
-The complete Python API reference is available at
[api/python](@pulsar:apidoc:python@).
+For the changelog of Pulsar Python clients, see [release
notes](/release-notes/#python).
## Examples
diff --git a/site2/website-next/docs/client-libraries-websocket.md
b/site2/website-next/docs/client-libraries-websocket.md
index ac45e6444d0..554b46be02e 100644
--- a/site2/website-next/docs/client-libraries-websocket.md
+++ b/site2/website-next/docs/client-libraries-websocket.md
@@ -4,12 +4,11 @@ title: Pulsar WebSocket API
sidebar_label: "WebSocket"
---
-Pulsar
[WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
API provides a simple way to interact with Pulsar using languages that do not
have an official [client library](client-libraries.md). Through WebSocket, you
can publish and consume messages and use features available on the [Client
Features Matrix](https://github.com/apache/pulsar/wiki/Client-Features-Matrix)
page.
+Pulsar
[WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
API provides a simple way to interact with Pulsar using languages that do not
have an official [client library](client-libraries.md). You can use Pulsar
WebSocket API with any WebSocket client library. See [Python and Node.js
examples](#client-examples) for more details.
+Through WebSocket, you can publish and consume messages and use features
available on the [Client Feature
Matrix](https://docs.google.com/spreadsheets/d/1YHYTkIXR8-Ql103u-IMI18TXLlGStK8uJjDsOOA0T20/edit#gid=1784579914)
page.
-> You can use Pulsar WebSocket API with any WebSocket client library. See
examples for Python and Node.js [below](#client-examples).
-
-## Running the WebSocket service
+## Run the WebSocket service
The standalone variant of Pulsar that we recommend using for [local
development](getting-started-standalone.md) already has the WebSocket service
enabled.
@@ -60,7 +59,7 @@ To enable encryption at rest on WebSocket service, add
CryptoKeyReaderFactory fa
cryptoKeyReaderFactoryClassName=org.apache.pulsar.MyCryptoKeyReaderFactoryClassImpl
```
-### Starting the broker
+### Start the broker
When the configuration is set, you can start the service using the
[`pulsar-daemon`](reference-cli-tools.md) tool:
@@ -68,9 +67,13 @@ When the configuration is set, you can start the service
using the [`pulsar-daem
bin/pulsar-daemon start websocket
```
+## Release notes
+
+For the changelog of Pulsar WebSocket APIs, see [release
notes](/release-notes/#websocket).
+
## API Reference
-Pulsar's WebSocket API offers three endpoints for
[producing](#producer-endpoint) messages, [consuming](#consumer-endpoint)
messages and [reading](#reader-endpoint) messages.
+Pulsar's WebSocket API offers three endpoints for
[producing](#producer-endpoint), [consuming](#consumer-endpoint), and
[reading](#reader-endpoint) messages.
All exchanges via the WebSocket API use JSON.
@@ -110,7 +113,7 @@ Key | Type | Required? | Explanation
`encryptionKeys` | string | no | Encryption key to encrypt published message
only if encryption reader is configured using cryptoKeyReaderFactoryClassName
config in websocket-configuration.
-#### Publishing a message
+#### Publish a message
```json
{
@@ -187,7 +190,7 @@ even if the client doesn't consume on the WebSocket.
:::
-##### Receiving messages
+##### Receive messages
Server will push messages on the WebSocket session:
@@ -247,7 +250,7 @@ Below are the parameters in the WebSocket consumer response.
`keyValue` | string | yes | Encryption key (Base64 encoding)
`metadata` | key-value pairs | no | Application-defined metadata
-#### Acknowledging the message
+#### Acknowledge the message
Consumer needs to acknowledge the successful processing of the message to
have the Pulsar broker delete it.
@@ -262,7 +265,7 @@ Key | Type | Required? | Explanation
:---|:-----|:----------|:-----------
`messageId`| string | yes | Message ID of the processed message
-#### Negatively acknowledging messages
+#### Negatively acknowledge messages
```json
{
diff --git a/site2/website-next/docs/client-libraries.md
b/site2/website-next/docs/client-libraries.md
index a6927253c86..d47951f8643 100644
--- a/site2/website-next/docs/client-libraries.md
+++ b/site2/website-next/docs/client-libraries.md
@@ -9,7 +9,7 @@ Pulsar supports the following language-specific client
libraries:
| Language | Documentation
| Release note
| Code repo
|
| ---------
|-----------------------------------------------------------------------------------|
---------------------------------------------------------------------------------
| --------------------------------------------------------------------- |
| Java | [User doc](client-libraries-java.md) <br/> [API
doc](/api/client/) | [Bundled](/release-notes/)
|
[Bundled](https://github.com/apache/pulsar/tree/master/pulsar-client) |
-| C++ | [User doc](client-libraries-cpp.md) <br/> [API
doc](pathname:///api/cpp/3.0.0) | [Bundled](/release-notes/)
|
[Standalone](https://github.com/apache/pulsar/pulsar-client-cpp) |
+| C++ | [User doc](client-libraries-cpp.md) <br/> [API
doc](pathname:///api/cpp/3.0.0) | [Bundled](/release-notes/)
|
[Standalone](https://github.com/apache/pulsar-client-cpp) |
| Python | [User doc](client-libraries-python.md) <br/> [API
doc](@pulsar:apidoc:python@) | [Bundled](/release-notes/)
|
[Standalone](https://github.com/apache/pulsar-client-python) |
| Go client | [User doc](client-libraries-go.md)
|
[Standalone](https://github.com/apache/pulsar-client-go/releases)
| [Standalone](https://github.com/apache/pulsar-client-go) |
| Node.js | [User doc](client-libraries-node.md)
|
[Standalone](https://github.com/apache/pulsar-client-node/releases)
| [Standalone](https://github.com/apache/pulsar-client-node) |