Jroland / kafka-net

Native C# client for Kafka queue servers.
Apache License 2.0
482 stars 232 forks source link

Implementation on .Net Framework 4.0 #54

Open quechao123 opened 9 years ago

quechao123 commented 9 years ago

Dear James and All contributors,

I need to build this project upon .Net Framework 4.0. The only one issue left is the new method SemaphoreSlim.WaitAsync(CancellationToken canceller), which is introduced in .NET 4.5.

Could you please provide some advises? Or do you have plan to make this be compatible with .NET 4.0? Thank you and Best regards,

Jroland commented 9 years ago

We really started to use the slim a lot in the latest code changes... I'll look into some alternatives for 4.0,

Jroland commented 9 years ago

This blog post has some indications of how to accomplish this: http://blogs.msdn.com/b/pfxteam/archive/2012/02/11/10266920.aspx

Jroland commented 9 years ago

And here is a guy that has a whole library with Async primitives created: https://github.com/StephenCleary/AsyncEx/wiki/AsyncSemaphore

AdrianSzymczak commented 9 years ago

Hi, with team we would like to use Kafka in our project. Unfortunately we weren't able to find any client compatible with .net 4.0 hence our attention was brought to this issue. Do you plan to work on this or alternatively could please suggest some workaround? (windows xp support is a must)

Jroland commented 9 years ago

This is a pull request that references the nuget packages that provide await keyword support in 4.0. However I have not been able to fully test that request so I have not pulled it into the main branch. It should not be too hard to do the same thing. Really that is the only piece of the codebase that requires 4.5... except for maybe some of the concurrent data structures, like semaphoreslim, or concurrentqueue. Not sure of the exact version its supported by.

tohyongcheng commented 8 years ago

+1 this would be greatly appreciated, as we are using .Net 4 too. Any updates or todos here?