title: Consumer example for Google Pub/Sub in C++
body: <p>I am trying to play around Google Pub/Sub and I need to integrate it in C++ code-base.</p>
  
  <p>As there is no native support for <code>Google Pub/Sub</code> in C++, I am using it through <code>gRPC</code>. Thus, I have generated corresponding <code>pubsub.grpc.pb.h</code>, <code>pubsub.grpc.pb.cc</code>, <code>pubsub.pb.h</code> and <code>pubsub.pb.cc</code> files via <code>protoc</code>.</p>
  
  <p>Question part: because of lack of documentation it would be very helpful to have an example in C++. I have found an <a href="https://groups.google.com/forum/#!topic/cloud-pubsub-discuss/BE7A5qFqywQ" rel="nofollow noreferrer">example</a> for publisher part, but not for the subscriber part. I tried to dive into the generated code and examples in other languages, but quite many question arise. Is there any example for the subscriber part? Or may be someone already had such kind of experience?</p>