由于go client是基于c++的客户端做的,所以要下载c++的客户端且go的版本不能大于c++的版本
mac
#下载c++客户端
brew install https://raw.githubusercontent.com/apache/pulsar/master/pulsar-client-cpp/homebrew/libpulsar.rb
#下载2.2的源码,复制到go/src/github.com/apache/pulsar
wget https://codeload.github.com/apache/pulsar/zip/branch-2.2
复制完后pulsar目录是这样的
ubuntu
#下载dep http://pulsar.apache.org/docs/en/client-libraries-cpp/
wget http://mirrors.shu.edu.cn/apache/pulsar/pulsar-2.2.0/DEB/apache-pulsar-client.deb
wget http://mirrors.hust.edu.cn/apache/pulsar/pulsar-2.2.0/DEB/apache-pulsar-client-dev.deb
dpkg -i apache-pulsar-client*.deb
#下载2.2的源码,复制到go/src/github.com/apache/pulsar
wget https://codeload.github.com/apache/pulsar/zip/branch-2.2