title: Google Cloud PubSub V1 using GCloud Emulator
body: <p>I'm fighting with Google Docs for setting up Cloud PubSub with .NET using a PubSub emulator.</p>
  
  <p><a href="https://cloud.google.com/dotnet/docs/getting-started/using-pub-sub" rel="nofollow noreferrer">https://cloud.google.com/dotnet/docs/getting-started/using-pub-sub</a></p>
  
  <p><a href="https://cloud.google.com/pubsub/docs/publisher" rel="nofollow noreferrer">https://cloud.google.com/pubsub/docs/publisher</a></p>
  
  <p><a href="https://cloud.google.com/pubsub/docs/emulator" rel="nofollow noreferrer">https://cloud.google.com/pubsub/docs/emulator</a></p>
  
  <p>Coming from a Rails background, I'm tasked to implement Cloud PubSub for a .NET product, running our google cloud on .NET Core, to enable it to publish.</p>
  
  <pre><code>Google::Cloud::Pubsub.new(project: project_id, emulator_host: emulator_host)
  </code></pre>
  
  <p>From the documentation using .NET, I keep coming back to the following:</p>
  
  <pre><code>PublisherServiceApiClient publisherClient = PublisherServiceApiClient.Create();
  PublisherClient publisher = PublisherClient.Create(...)
  </code></pre>
  
  <p>However, the library used from the docs <code>Google.Cloud.PubSub.V1 -Pre
  </code> does not contain the definition.</p>
  
  <p><code>'PublisherClient' does not contain a definition for 'Create'</code>. </p>
  
  <p>Instead, I get <code>CreateAsync</code> that takes in <code>TopicName</code>, <code>PublisherClient.ClientCreationSettings</code> and <code>PublisherClient.Settings</code>.</p>
  
  <p><a href="https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.PubSub.V1/api/Google.Cloud.PubSub.V1.PublisherClient.html" rel="nofollow noreferrer">https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.PubSub.V1/api/Google.Cloud.PubSub.V1.PublisherClient.html</a></p>
  
  <p>I noticed that <code>PublisherServiceApiClient</code> can take in a <code>Channel</code>, but I'm confused on how to get this going.</p>
  
  <p>To conclude with an actual question, how does one currently implement Cloud PubSub with .NET for in cloud and then locally with emulator? Adding to that, am I using the wrong library or the wrong docs?</p>
  
  <p>Any suggestions, pointers or piece of advice would be truly appreciated.</p>