LoopPerfect / buckaroo-wishlist

Meta repo for Buckaroo package requests ✨
https://buckaroo.pm
MIT License
9 stars 0 forks source link

Add Pulsar cpp client #126

Closed aahmed-se closed 5 years ago

aahmed-se commented 5 years ago

https://github.com/apache/pulsar/tree/master/pulsar-client-cpp

njlr commented 5 years ago

Which platforms are you interested in?

aahmed-se commented 5 years ago

osx and linux

njlr commented 5 years ago

It looks like pulsar requires an older version of Protobuf (2.60). Stay tuned...

aahmed-se commented 5 years ago

Not sure about that I think pulsar in master works fine with protobuf 3.6

njlr commented 5 years ago

Ah, I was just going by the Homebrew deps. I will make it work with any Protobuf then.

njlr commented 5 years ago

It also requires https://github.com/lz4/lz4 so porting that now.

njlr commented 5 years ago

I have ported it to Linux. You can see a demo here: https://github.com/njlr/apache-pulsar-demo

It should be largely the same on macOS, but I won't be able to test until I get home.

aahmed-se commented 5 years ago

the demo seems to work on osx

buck run :demo
Using additional configuration options from .buckconfig.d/.buckconfig.buckaroo
Action graph will be rebuilt because there was an issue with watchman:
Too many files changed.
Processing filesystem changes: finished in 1.0 sec
Parsing buck files: finished in 3.1 sec
Creating action graph: finished in 5.5 sec
Building: finished in 1.2 sec (100%) 57/57 jobs, 0 updated
  Total time: 9.9 sec
2019-02-07 10:42:44.419 INFO  Client:88 | Subscribing on Topic :persistent://prop/r1/ns1/my-topic
2019-02-07 10:42:44.421 INFO  ConnectionPool:96 | Created connection for pulsar://localhost:6650
2019-02-07 10:42:44.423 INFO  ClientConnection:290 | [127.0.0.1:62432 -> 127.0.0.1:6650] Connected to broker
2019-02-07 10:42:44.428 INFO  HandlerBase:52 | [persistent://prop/r1/ns1/my-topic, consumer-1, 0] Getting connection from pool
2019-02-07 10:42:44.437 INFO  ConnectionPool:96 | Created connection for pulsar://Alis-MacBook-Pro.local:6650
2019-02-07 10:42:44.438 INFO  ClientConnection:292 | [127.0.0.1:62434 -> 127.0.0.1:6650] Connected to broker through proxy. Logical broker: pulsar://Alis-MacBook-Pro.local:6650
2019-02-07 10:42:44.561 INFO  ConsumerImpl:169 | [persistent://prop/r1/ns1/my-topic, consumer-1, 0] Created consumer on broker [127.0.0.1:62434 -> 127.0.0.1:6650] 
njlr commented 5 years ago

Awesome! :tada:

I will close this issue, if you don't mind.

Please post any problems that you encounter or if you get stuck. :+1:

Improving the docs is one of our main objectives at the moment, and any feedback would be appreciated!