This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-dotpulsar.git
The following commit(s) were added to refs/heads/master by this push:
new b440bc6 docs: move docfx away from the root (#157)
b440bc6 is described below
commit b440bc63f712801ce41891783e94fe5e2d247fd8
Author: entvex <[email protected]>
AuthorDate: Sat May 27 16:13:16 2023 +0200
docs: move docfx away from the root (#157)
Co-authored-by: tison <[email protected]>
---
.github/workflows/ci-unit.yaml | 8 +-
.gitignore | 8 --
CONTRIBUTING.md | 4 +-
README.md | 29 ++++----
.../assets/riderAutoCleanOnCommit.gif | Bin
{docs => dev-docs}/assets/vs2022CleanOnSave.gif | Bin
{docs => dev-docs}/assets/vs2022WithReSharper.gif | Bin
{docs => dev-docs}/coding-style.md | 0
docs/.gitignore | 9 +++
{api => docs/api}/.gitignore | 0
{api => docs/api}/index.md | 0
{assets => docs/assets}/favicon.ico | Bin
{assets => docs/assets}/pulsar.svg | 0
docfx.json => docs/docfx.json | 5 +-
README.md => docs/index.md | 81 ++++++++++-----------
toc.yml => docs/toc.yml | 0
index.md | 1 -
src/DotPulsar/DotPulsar.csproj | 4 +-
18 files changed, 75 insertions(+), 74 deletions(-)
diff --git a/.github/workflows/ci-unit.yaml b/.github/workflows/ci-unit.yaml
index 28f7f4a..01ea509 100644
--- a/.github/workflows/ci-unit.yaml
+++ b/.github/workflows/ci-unit.yaml
@@ -64,6 +64,8 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'
- - run: dotnet tool update -g docfx
- - run: dotnet restore
- - run: docfx docfx.json
+ - name: Build docs with docfx
+ run: |
+ dotnet tool update -g docfx
+ dotnet build -p:TargetFramework=net7.0
+ docfx docs/docfx.json
diff --git a/.gitignore b/.gitignore
index 9059210..e556c66 100644
--- a/.gitignore
+++ b/.gitignore
@@ -291,11 +291,3 @@ Temporary Items
# VSCode
.devcontainer
.vscode
-
-# docfx
-/**/DROP/
-/**/TEMP/
-/**/packages/
-/**/bin/
-/**/obj/
-_site
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d415aa7..8811c0f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,7 +48,7 @@ The best way to create a minimal reproduction is gradually
removing code and dep
Please do:
-* **DO** follow our [coding style](/docs/coding-style.md) (C# code-specific).
+* **DO** follow our [coding style](/dev-docs/coding-style.md) (C#
code-specific).
* **DO** include tests when adding new features. When fixing bugs, start with
adding a test that highlights how the current behavior is broken.
* **DO** keep the discussions focused. When a new or related topic comes up
@@ -83,7 +83,7 @@ We use and recommend the following workflow:
- State in the description what issue or improvement your change is
addressing.
- Check if all the Continuous Integration checks are passing.
8. Wait for feedback or approval of your changes from the maintainers.
- - Should you receive feedback. The maintainer will apply the label 'WIP' to
indicate that you should incorporate the changes.
+ - Should you receive feedback. The maintainer will apply the label 'WIP' to
indicate that you should incorporate the changes.
9. If all looks good, and all checks are green, your PR will be merged.
- The next official build will automatically include your change.
- You can delete the branch you used for making the change.
diff --git a/README.md b/README.md
index fc34b28..5b99985 100644
--- a/README.md
+++ b/README.md
@@ -15,25 +15,28 @@ Have a look at the [changelog](CHANGELOG.md).
Let's take a look at a "Hello world" example, where we first produce a message
and then consume it. Note that the topic and subscription will be created if
they don't exist.
First, we need a Pulsar setup. See [Pulsar
docs](https://pulsar.apache.org/docs/getting-started-home/) for how to set up a
local standalone Pulsar instance.
-Install the NuGet package
[DotPulsar](https://www.nuget.org/packages/DotPulsar/) and copy/paste the code
below (you will need to use declarations for 'DotPulsar' and
'DotPulsar.Extensions').
+
+Install the NuGet package
[DotPulsar](https://www.nuget.org/packages/DotPulsar/) and run the follow code
example:
```csharp
-const string myTopic = "persistent://public/default/mytopic";
+using DotPulsar;
+using DotPulsar.Extensions;
-await using var client = PulsarClient.Builder()
- .Build(); // Connecting to
pulsar://localhost:6650
+const string myTopic = "persistent://public/default/mytopic";
-await using var producer = client.NewProducer(Schema.String)
- .Topic(myTopic)
- .Create();
+// connecting to pulsar://localhost:6650
+await using var client = PulsarClient.Builder().Build();
-_ = await producer.Send("Hello World"); // Send a message and ignore the
returned MessageId
+// produce a message
+await using var producer =
client.NewProducer(Schema.String).Topic(myTopic).Create();
+await producer.Send("Hello World");
+// consume messages
await using var consumer = client.NewConsumer(Schema.String)
- .SubscriptionName("MySubscription")
- .Topic(myTopic)
-
.InitialPosition(SubscriptionInitialPosition.Earliest)
- .Create();
+ .SubscriptionName("MySubscription")
+ .Topic(myTopic)
+ .InitialPosition(SubscriptionInitialPosition.Earliest)
+ .Create();
await foreach (var message in consumer.Messages())
{
@@ -101,7 +104,7 @@ We use [SemVer](http://semver.org/) for versioning. For the
versions available,
* **Daniel Blankensteiner** - *Initial work* - [Danske
Commodities](https://github.com/DanskeCommodities)
-Contributions are welcomed and greatly appreciated. See also the list of
[contributors](https://github.com/apache/pulsar-dotpulsar/contributors) who
participated in this project.
+Contributions are welcomed and greatly appreciated. See also the list of
[contributors](https://github.com/apache/pulsar-dotpulsar/contributors) who
participated in this project. Read the [CONTRIBUTING](CONTRIBUTING.md) guide
for how to participate.
If your contribution adds Pulsar features for C# clients, you need to update
both the [Pulsar docs](https://pulsar.apache.org/docs/client-libraries/) and
the [Client Feature Matrix](https://pulsar.apache.org/client-feature-matrix/).
See [Contribution
Guide](https://pulsar.apache.org/contribute/site-intro/#pages) for more details.
diff --git a/docs/assets/riderAutoCleanOnCommit.gif
b/dev-docs/assets/riderAutoCleanOnCommit.gif
similarity index 100%
rename from docs/assets/riderAutoCleanOnCommit.gif
rename to dev-docs/assets/riderAutoCleanOnCommit.gif
diff --git a/docs/assets/vs2022CleanOnSave.gif
b/dev-docs/assets/vs2022CleanOnSave.gif
similarity index 100%
rename from docs/assets/vs2022CleanOnSave.gif
rename to dev-docs/assets/vs2022CleanOnSave.gif
diff --git a/docs/assets/vs2022WithReSharper.gif
b/dev-docs/assets/vs2022WithReSharper.gif
similarity index 100%
rename from docs/assets/vs2022WithReSharper.gif
rename to dev-docs/assets/vs2022WithReSharper.gif
diff --git a/docs/coding-style.md b/dev-docs/coding-style.md
similarity index 100%
rename from docs/coding-style.md
rename to dev-docs/coding-style.md
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000..11740bc
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,9 @@
+###############
+# folder #
+###############
+/**/DROP/
+/**/TEMP/
+/**/packages/
+/**/bin/
+/**/obj/
+_site
diff --git a/api/.gitignore b/docs/api/.gitignore
similarity index 100%
rename from api/.gitignore
rename to docs/api/.gitignore
diff --git a/api/index.md b/docs/api/index.md
similarity index 100%
rename from api/index.md
rename to docs/api/index.md
diff --git a/assets/favicon.ico b/docs/assets/favicon.ico
similarity index 100%
rename from assets/favicon.ico
rename to docs/assets/favicon.ico
diff --git a/assets/pulsar.svg b/docs/assets/pulsar.svg
similarity index 100%
rename from assets/pulsar.svg
rename to docs/assets/pulsar.svg
diff --git a/docfx.json b/docs/docfx.json
similarity index 92%
rename from docfx.json
rename to docs/docfx.json
index 69ad53b..5187694 100644
--- a/docfx.json
+++ b/docs/docfx.json
@@ -3,8 +3,9 @@
{
"src": [
{
+ "src": "..",
"files": [
- "src/DotPulsar/bin/**/*.dll"
+ "src/DotPulsar/bin/**/net7.0/DotPulsar.dll"
]
}
],
@@ -29,8 +30,6 @@
{
"files": [
"toc.yml",
- "CHANGELOG.md",
- "CONTRIBUTING.md",
"index.md"
]
}
diff --git a/README.md b/docs/index.md
similarity index 58%
copy from README.md
copy to docs/index.md
index fc34b28..ca78b1e 100644
--- a/README.md
+++ b/docs/index.md
@@ -1,39 +1,40 @@
# DotPulsar
-
-
The official .NET client library for [Apache
Pulsar](https://pulsar.apache.org/).
DotPulsar is written entirely in C# and implements Apache Pulsar's [binary
protocol](https://pulsar.apache.org/docs/en/develop-binary-protocol/).
## What's new?
-Have a look at the [changelog](CHANGELOG.md).
+Have a look at the
[changelog](https://github.com/apache/pulsar-dotpulsar/blob/master/CHANGELOG.md).
## Getting Started
Let's take a look at a "Hello world" example, where we first produce a message
and then consume it. Note that the topic and subscription will be created if
they don't exist.
First, we need a Pulsar setup. See [Pulsar
docs](https://pulsar.apache.org/docs/getting-started-home/) for how to set up a
local standalone Pulsar instance.
-Install the NuGet package
[DotPulsar](https://www.nuget.org/packages/DotPulsar/) and copy/paste the code
below (you will need to use declarations for 'DotPulsar' and
'DotPulsar.Extensions').
+
+Install the NuGet package
[DotPulsar](https://www.nuget.org/packages/DotPulsar/) and run the follow code
example:
```csharp
-const string myTopic = "persistent://public/default/mytopic";
+using DotPulsar;
+using DotPulsar.Extensions;
-await using var client = PulsarClient.Builder()
- .Build(); // Connecting to
pulsar://localhost:6650
+const string myTopic = "persistent://public/default/mytopic";
-await using var producer = client.NewProducer(Schema.String)
- .Topic(myTopic)
- .Create();
+// connecting to pulsar://localhost:6650
+await using var client = PulsarClient.Builder().Build();
-_ = await producer.Send("Hello World"); // Send a message and ignore the
returned MessageId
+// produce a message
+await using var producer =
client.NewProducer(Schema.String).Topic(myTopic).Create();
+await producer.Send("Hello World");
+// consume messages
await using var consumer = client.NewConsumer(Schema.String)
- .SubscriptionName("MySubscription")
- .Topic(myTopic)
-
.InitialPosition(SubscriptionInitialPosition.Earliest)
- .Create();
+ .SubscriptionName("MySubscription")
+ .Topic(myTopic)
+ .InitialPosition(SubscriptionInitialPosition.Earliest)
+ .Create();
await foreach (var message in consumer.Messages())
{
@@ -46,37 +47,37 @@ For a more in-depth tour of the API, please visit the
[Wiki](https://github.com/
## Supported features
-- [X] Service discovery
-- [X] Automatic reconnect
-- [X] TLS connections
-- [X] Pulsar Proxy
-- [X] Producer - send with custom metadata
-- [X] Producer - send with event time, sequence id, and delayed message
delivery
-- [X] Producer - send with key and ordering key
-- [X] Producer - partitioned topics
-- [X] Consumer - subscription with initial position and priority level
-- [X] Consumer - subscription types exclusive, shared, failover, and key shared
-- [X] Consumer - receive and single + cumulative acknowledge
-- [X] Consumer/Reader - seek on message-id and publish time
-- [X] Consumer - unsubscribe
-- [X] Consumer - compacted topics
-- [X] Reader API
-- [X] Read/Consume/Acknowledge batched messages
-- [X] Telemetry
+- Service discovery
+- Automatic reconnect
+- TLS connections
+- Pulsar Proxy
+- Producer - send with custom metadata
+- Producer - send with event time, sequence id, and delayed message delivery
+- Producer - send with key and ordering key
+- Producer - partitioned topics
+- Consumer - subscription with initial position and priority level
+- Consumer - subscription types exclusive, shared, failover, and key shared
+- Consumer - receive and single + cumulative acknowledge
+- Consumer/Reader - seek on message-id and publish time
+- Consumer - unsubscribe
+- Consumer - compacted topics
+- Reader API
+- Read/Consume/Acknowledge batched messages
+- Telemetry
- [Tracing](https://github.com/apache/pulsar-dotpulsar/wiki/Tracing)
- [Metrics](https://github.com/apache/pulsar-dotpulsar/wiki/Metrics)
-- [X] Authentication
+- Authentication
- TLS Authentication
- JSON Web Token Authentication
- Custom Authentication
-- [X] [Message
compression](https://github.com/apache/pulsar-dotpulsar/wiki/Compression)
+- [Message
compression](https://github.com/apache/pulsar-dotpulsar/wiki/Compression)
- LZ4
- ZLIB
- ZSTD
- SNAPPY
-- [X] Schemas
+- Schemas
- Boolean
- - Bytes (using byte[] and ReadOnlySequence\<byte\>)
+ - Bytes (using `byte[]` and `ReadOnlySequence<byte>`)
- String (UTF-8, UTF-16, and US-ASCII)
- INT8, INT16, INT32, and INT64
- Float and Double
@@ -85,10 +86,6 @@ For a more in-depth tour of the API, please visit the
[Wiki](https://github.com/
For a horizontal comparison with more language-specific clients, see [Client
Feature Matrix](https://pulsar.apache.org/client-feature-matrix/).
-## Roadmap
-
-Help prioritizing the roadmap is most welcome, so please reach out and tell us
what you want and need.
-
## Join Our Community
Apache Pulsar has a [Slack instance](https://pulsar.apache.org/contact/), and
there you'll find us in the #dev-dotpulsar channel.
@@ -97,11 +94,11 @@ Apache Pulsar has a [Slack
instance](https://pulsar.apache.org/contact/), and th
We use [SemVer](http://semver.org/) for versioning. For the versions
available, see the [tags on this
repository](https://github.com/apache/pulsar-dotpulsar/tags).
-## Authors
+## Contribution
* **Daniel Blankensteiner** - *Initial work* - [Danske
Commodities](https://github.com/DanskeCommodities)
-Contributions are welcomed and greatly appreciated. See also the list of
[contributors](https://github.com/apache/pulsar-dotpulsar/contributors) who
participated in this project.
+Contributions are welcomed and greatly appreciated. See also the list of
[contributors](https://github.com/apache/pulsar-dotpulsar/contributors) who
participated in this project. Read the
[CONTRIBUTING](https://github.com/apache/pulsar-dotpulsar/blob/master/CONTRIBUTING.md)
guide for how to participate.
If your contribution adds Pulsar features for C# clients, you need to update
both the [Pulsar docs](https://pulsar.apache.org/docs/client-libraries/) and
the [Client Feature Matrix](https://pulsar.apache.org/client-feature-matrix/).
See [Contribution
Guide](https://pulsar.apache.org/contribute/site-intro/#pages) for more details.
diff --git a/toc.yml b/docs/toc.yml
similarity index 100%
rename from toc.yml
rename to docs/toc.yml
diff --git a/index.md b/index.md
deleted file mode 120000
index 42061c0..0000000
--- a/index.md
+++ /dev/null
@@ -1 +0,0 @@
-README.md
\ No newline at end of file
diff --git a/src/DotPulsar/DotPulsar.csproj b/src/DotPulsar/DotPulsar.csproj
index bcb70a1..0675118 100644
--- a/src/DotPulsar/DotPulsar.csproj
+++ b/src/DotPulsar/DotPulsar.csproj
@@ -21,7 +21,7 @@
<NoWarn>1591</NoWarn>
</PropertyGroup>
- <ItemGroup>
+ <ItemGroup>
<PackageReference Include="HashDepot" Version="2.0.3" />
<PackageReference Include="Microsoft.Extensions.ObjectPool"
Version="7.0.5" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1"
PrivateAssets="All" />
@@ -39,7 +39,7 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Diagnostics.DiagnosticSource"
Version="7.0.2" />
</ItemGroup>
-
+
<ItemGroup>
<None Include="PackageIcon.png" Pack="true" PackagePath="/"
Visible="False" />
</ItemGroup>