-
Notifications
You must be signed in to change notification settings - Fork 880
RdKafka -> Confluent.Kafka #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 | |
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RdKafka", "src\RdKafka\RdKafka.xproj", "{B2DDB635-4423-45D7-B3DC-F701E6010868}" | ||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Confluent.Kafka", "src\Confluent.Kafka\Confluent.Kafka.xproj", "{B2DDB635-4423-45D7-B3DC-F701E6010868}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need new project UUIDs? Not sure how these are used exactly, but I'd guess that if we keep them the same it could cause conflicts with an rdkafka-dotnet checkout. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see other comment |
||
EndProject | ||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RdKafka.Tests", "test\RdKafka.Tests\RdKafka.Tests.xproj", "{33151BE2-C10B-41BC-8C5E-E55211A1722D}" | ||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Confluent.Kafka.Tests", "test\Confluent.Kafka.Tests\Confluent.Kafka.Tests.xproj", "{33151BE2-C10B-41BC-8C5E-E55211A1722D}" | ||
EndProject | ||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SimpleProducer", "examples\SimpleProducer\SimpleProducer.xproj", "{A7BF0A75-D3E7-4024-8597-5FCCC567D372}" | ||
EndProject | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,19 @@ | ||
rdkafka-dotnet - C# Apache Kafka client | ||
======================================= | ||
confluent-kafka-dotnet - .NET Apache Kafka client | ||
================================================= | ||
|
||
[](https://travis-ci.org/ah-/rdkafka-dotnet) | ||
[](https://ci.appveyor.com/project/ah-/rdkafka-dotnet) | ||
[](https://gitter.im/edenhill/librdkafka) | ||
**confluent-kafka-dotnet** is a .NET client for [Apache Kafka](http://kafka.apache.org/) based on [librdkafka](https://github.com/edenhill/librdkafka). | ||
|
||
Copyright (c) 2015-2016, [Andreas Heider](mailto:[email protected]) | ||
Forked from [rdkafka-net](https://github.com/ah-/rdkafka-dotnet) by Andreas Heider | ||
|
||
**rdkafka-dotnet** is a C# client for [Apache Kafka](http://kafka.apache.org/) based on [librdkafka](https://github.com/edenhill/librdkafka). | ||
Copyright (c) 2016 [Confluent Inc.](https://www.confluent.io), 2015-2016, [Andreas Heider](mailto:[email protected]) | ||
|
||
**rdkafka-dotnet** is licensed under the 2-clause BSD license. | ||
|
||
## Usage | ||
|
||
Just reference the [RdKafka NuGet package](https://www.nuget.org/packages/RdKafka) | ||
Just reference the [confluent-kafka-dotnet NuGet package](https://www.nuget.org/packages/confluent-kafka-dotnet) | ||
|
||
## Examples | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're stripping out the contents of these sections can we drop them entirely? We can always restore them later (and we should file a JIRA to track that if we need to follow up later once we've cleaned up APIs etc). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. up to you on this one - i don't have an opinion either way. |
||
|
||
### Producing messages | ||
|
||
```cs | ||
using (Producer producer = new Producer("127.0.0.1:9092")) | ||
using (Topic topic = producer.Topic("testtopic")) | ||
{ | ||
byte[] data = Encoding.UTF8.GetBytes("Hello RdKafka"); | ||
DeliveryReport deliveryReport = await topic.Produce(data); | ||
Console.WriteLine($"Produced to Partition: {deliveryReport.Partition}, Offset: {deliveryReport.Offset}"); | ||
} | ||
|
||
``` | ||
|
||
### Consuming messages | ||
|
||
```cs | ||
var config = new Config() { GroupId = "example-csharp-consumer" }; | ||
using (var consumer = new EventConsumer(config, "127.0.0.1:9092")) | ||
{ | ||
consumer.OnMessage += (obj, msg) => | ||
{ | ||
string text = Encoding.UTF8.GetString(msg.Payload, 0, msg.Payload.Length); | ||
Console.WriteLine($"Topic: {msg.Topic} Partition: {msg.Partition} Offset: {msg.Offset} {text}"); | ||
}; | ||
|
||
consumer.Subscribe(new []{"testtopic"}); | ||
consumer.Start(); | ||
|
||
Console.WriteLine("Started consumer, press enter to stop consuming"); | ||
Console.ReadLine(); | ||
} | ||
``` | ||
|
||
### More | ||
|
||
See `examples/` | ||
|
||
## Documentation | ||
|
||
[Read the API Documentation here](https://ah-.github.io/rdkafka-dotnet/api/RdKafka.html) | ||
|
||
[Read the FAQ for answers to common questions](https://github.com/ah-/rdkafka-dotnet/wiki/Faq) | ||
|
||
## Supported Platforms and .NET Releases | ||
|
||
Requires .NET 4.5 or later. Tested with .NET Core on Linux, OS X and Windows, and classic .NET 4.5 on Windows. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,19 @@ | ||
rdkafka-dotnet - C# Apache Kafka client | ||
======================================= | ||
confluent-kafka-dotnet - .NET Apache Kafka client | ||
================================================= | ||
|
||
**rdkafka-dotnet** is a C# client for [Apache Kafka](http://kafka.apache.org/) based on [librdkafka](https://github.com/edenhill/librdkafka). | ||
**confluent-kafka-dotnet** is a .NET client for [Apache Kafka](http://kafka.apache.org/) based on [librdkafka](https://github.com/edenhill/librdkafka). | ||
|
||
## Usage | ||
Forked from [rdkafka-net](https://github.com/ah-/rdkafka-dotnet) by Andreas Heider. | ||
|
||
Copyright (c) 2016 [Confluent Inc.](https://www.confluent.io), 2015-2016, [Andreas Heider](mailto:[email protected]) | ||
|
||
Just reference the [RdKafka NuGet package](https://www.nuget.org/packages/RdKafka) | ||
|
||
## Api Reference | ||
## Usage | ||
|
||
[Read the Api Documentation here](api/RdKafka.html) | ||
Just reference the [confluent-kafka-dotnet NuGet package](https://www.nuget.org/packages/confluent-kafka-dotnet) | ||
|
||
## Examples | ||
|
||
### Producing messages | ||
|
||
```cs | ||
using (Producer producer = new Producer("127.0.0.1:9092")) | ||
using (Topic topic = producer.Topic("testtopic")) | ||
{ | ||
byte[] data = Encoding.UTF8.GetBytes("Hello RdKafka"); | ||
DeliveryReport deliveryReport = await topic.Produce(data); | ||
Console.WriteLine($"Produced to Partition: {deliveryReport.Partition}, Offset: {deliveryReport.Offset}"); | ||
} | ||
|
||
``` | ||
|
||
### Consuming messages | ||
|
||
```cs | ||
var config = new Config() { GroupId = "example-csharp-consumer" }; | ||
using (var consumer = new EventConsumer(config, "127.0.0.1:9092")) | ||
{ | ||
consumer.OnMessage += (obj, msg) => | ||
{ | ||
string text = Encoding.UTF8.GetString(msg.Payload, 0, msg.Payload.Length); | ||
Console.WriteLine($"Topic: {msg.Topic} Partition: {msg.Partition} Offset: {msg.Offset} {text}"); | ||
}; | ||
|
||
consumer.Subscribe(new []{"testtopic"}); | ||
consumer.Start(); | ||
|
||
Console.WriteLine("Started consumer, press enter to stop consuming"); | ||
Console.ReadLine(); | ||
} | ||
``` | ||
## Documentation | ||
|
||
## Supported Platforms and .NET Releases |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
- name: Api reference | ||
href: api/RdKafka.html | ||
homepage: api/RdKafka.yml | ||
href: api/Confluent.Kafka.html | ||
homepage: api/Confluent.Kafka.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a new project uuid generated?
(I have no idea if it has any significance, but it looks random enough to be assumed as unique)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly. But I've done this sort of rename before a lot and never had problems and I'm also pretty sure that if you rename a project within VS it doesn't change the guid. I haven't been using VS yet (this was just a text editor change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't worried about a plain renaming so much as if someone tries to open both rdkafka-dotnet and confluent-kafka-dotnet in the same IDE. Will they be treated as unique projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there would only potentially be problems if someone tried to add both projects to the same solution (they should never want to - maybe they want to link against the two libraries, but that is different). In the event they do, I just checked and VS automatically generates new guids, it doesn't let them conflict.