title: How to publish a message to a Redis Channel (StackExchange.Redis)
body: <p>I have read an example about subscribing and publishing in StackExchange.Redis documents but I don't understand it.</p>
  <p>Why the example doesn't talk about publishing?</p>
  <pre><code>var channel = multiplexer.GetSubscriber().Subscribe(&quot;messages&quot;);
  channel.OnMessage(message =&gt;
  {
      Console.WriteLine((string)message.Message);
  });
  </code></pre>
  <p>How to implement subscribe and publish in Dotnet Core project?</p>
  <p>What is the RedisChannel, Anyone can explain it?</p>
  <p>I Do like this:</p>
  <pre><code>RedisChannel channelWithLiteral = new RedisChannel(&quot;messages&quot;, RedisChannel.PatternMode.Literal);
  </code></pre>
  <p>And</p>
  <pre><code>RedisChannel channelWithLiteral = new RedisChannel(&quot;messages&quot;, RedisChannel.PatternMode.Literal);
  
  var sub = connectionPoolManager.GetConnection().GetSubscriber();
  sub.PublishAsync(channelWithLiteral , Serializer.Serialize(message));
  </code></pre>
  <p>both Sub and Pub project. Is this correct?</p>