Apache License 2.0

项目介绍

apache/pulsar-dotpulsar 是一个托管在 GitHub 上的开源项目,主要使用 C# 编写,采用 Apache License 2.0 许可证,目前获得 270 个 Star、87 次 Fork。

仓库全名
apache/pulsar-dotpulsar
开源许可证
Apache License 2.0
Star 数
270
Fork 数
87
未关闭 Issue
17

README 摘要

DotPulsar The official .NET client library for Apache Pulsar. DotPulsar is written entirely in C# and implements Apache Pulsar's binary protocol. What's new? Have a look at the changelog. 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pulsar-dotpulsar 用什么语言开发?

主要使用 C# 编写,采用 Apache License 2.0 许可证,目前有 270 个 Star。

pulsar-dotpulsar 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pulsar-dotpulsar 的源码?

可以直接克隆仓库:git clone https://github.com/apache/pulsar-dotpulsar.git,默认分支为 master;安装与运行步骤见仓库 README。

pulsar-dotpulsar 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 17 个未关闭 Issue;Star 数为 270,可作为社区活跃度的参考。

关于

The official .NET client library for Apache Pulsar

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
484
价值分
191
活跃状态
活跃

README

DotPulsar

CI - Unit

The official .NET client library for Apache Pulsar.

DotPulsar is written entirely in C# and implements Apache Pulsar’s binary protocol.

What’s new?

Have a look at the changelog.

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 for how to set up a local standalone Pulsar instance.

Install the NuGet package DotPulsar and run the follow code example:

using DotPulsar;
using DotPulsar.Extensions;

const string myTopic = "persistent://public/default/mytopic";

// connecting to pulsar://localhost:6650
await using var client = PulsarClient.Builder().Build();

// 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();

await foreach (var message in consumer.Messages())
{
    Console.WriteLine($"Received: {message.Value()}");
    await consumer.Acknowledge(message);
}

For a more in-depth tour of the API, please visit the Wiki.

Supported features

  • 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 - multi-topic subscriptions
  • Consumer - receive and single + cumulative acknowledge
  • Consumer/Reader - seek on message-id and publish time
  • Consumer - unsubscribe
  • Consumer - compacted topics
  • Consumer - partitioned topics
  • Reader API
  • Read/Consume/Acknowledge batched messages
  • Telemetry
  • Authentication
    • TLS Authentication
    • JSON Web Token Authentication
    • Custom Authentication
  • Message compression
    • LZ4
    • ZLIB
    • ZSTD
    • SNAPPY
  • Schemas
    • Boolean
    • Bytes (using byte[] and ReadOnlySequence<byte>)
    • String (UTF-8, UTF-16, and US-ASCII)
    • INT8, INT16, INT32, and INT64
    • Float and Double
    • Time (using TimeSpan)
    • Timestamp and Date (using DateTime)
    • JSON
    • Protobuf

For a horizontal comparison with more language-specific clients, see 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, and there you’ll find us in the #dev-dotpulsar channel.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Contributions are welcomed and greatly appreciated. See also the list of contributors who participated in this project. Read the CONTRIBUTING guide for how to participate.

If your contribution adds Pulsar features for C# clients, you need to update both the Pulsar docs and the Client Feature Matrix. See Contribution Guide for more details.

License

This project is licensed under Apache License, Version 2.0.

评论

暂无评论