由于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的源碼,復(fù)制到go/src/github.com/apache/pulsar
wget https://codeload.github.com/apache/pulsar/zip/branch-2.2
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的源碼苍姜,復(fù)制到go/src/github.com/apache/pulsar
wget https://codeload.github.com/apache/pulsar/zip/branch-2.2