commit | 3ed77ff37ce0cb42a0c77a41599f737ab4612d38 | [log] [tgz] |
---|---|---|
author | Zike Yang <ar@armail.top> | Tue Jun 22 14:59:38 2021 +0800 |
committer | GitHub <noreply@github.com> | Tue Jun 22 08:59:38 2021 +0200 |
tree | c76267ae557bbcedea2882041e97983f6f6a8f16 | |
parent | 1622e28ddc869aa150d7a9af631e0bd83737265d [diff] |
[Test] Add integration test (#76) * Add PartitionedProducerProcess. * Remove PartitionedProducerState. * Add UpdatePartitions Event. * Implement PartitionedProducer. * Fix some problems * Remove PartitionedProducerProcess. * Make some classes sealed. * Use await in PartitionedProducer.Send * Fix test method name. * Make CreateSubProducers sync. * Fix some comments. * Subproducers * Change PartitionedProducer to Producer and add some comments. * Add UpdatePartitions to connect logic and fix some other problems. * Add integration test. * Improve integration framework * Update and add fixture. * Add integration test CI. * fix docker compose file not exist in stress test * fix * remove testcontainer * fix ci job name. * Fix lookup exception not retry. * Update integration test * Use async Task instead of async void.
# DotPulsar
The official .NET client library for Apache Pulsar.
DotPulsar is written entirely in C# and implements Apache Pulsar's binary protocol.
Have a look at the changelog.
Let's take a look at a “Hello world” example, where we first produce a message and then consume it.
Install the NuGet package DotPulsar and copy/paste the code below (you will be needing using declarations for ‘DotPulsar’ and ‘DotPulsar.Extensions’).
const string myTopic = "persistent://public/default/mytopic"; await using var client = PulsarClient.Builder() .Build(); //Connecting to pulsar://localhost:6650 var producer = client.NewProducer() .Topic(myTopic) .Create(); _ = await producer.Send(Encoding.UTF8.GetBytes("Hello World")); var consumer = client.NewConsumer() .SubscriptionName("MySubscription") .Topic(myTopic) .Create(); await foreach (var message in consumer.Messages()) { Console.WriteLine("Received: " + Encoding.UTF8.GetString(message.Data.ToArray())); await consumer.Acknowledge(message); }
For a more in-depth tour of the API, please visit the Wiki.
Help prioritizing the roadmap is most welcome, so please reach out and tell us what you want and need.
Apache Pulsar has a Slack instance and there you'll find us in the #dev-dotpulsar channel. Just waiting for you to pop by :-)
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details.