title: Seeking an understanding of ServiceStack.Redis: IRedisClient.PublishMessage vs IMessageQueueClient.Publish
body: <p>I am having a hard time separating the <code>IRedisClient.PublishMessage</code> and <code>IMessageQueueClient.Publish</code> and realize I must be mixing something up.</p>
  <p>ServiceStack gives us the option to listen for pub/sub broadcasts like this:</p>
  <pre><code>    static IRedisSubscription _subscription;
      static IRedisClient redisClientSub;
      static int received = 0;
      static void ReadFromQueue()
      {
          redisClientSub = redisClientManager.GetClient();
          _subscription = redisClientSub.CreateSubscription();
  
          _subscription.OnMessage = (channel, msg) =&gt;
          {
              try
              {
                  received++;
              }
              catch (Exception ex)
              {
                      
              }
          };
  
          Task.Run(() =&gt; _subscription.SubscribeToChannels(&quot;Test&quot;));
      }
  </code></pre>
  <p>Looks nice, straightforward. But what about the producer?</p>
  <p>When looking at the classes available, I thought that one could either user the <code>IRedisClient.PublishMessage(string toChannel, string message)</code> or <code>IMessageQueueClient.Publish(string queueName, IMessage message)</code>.</p>
  <pre><code>redisClient.PublishMessage(&quot;Test&quot;, json);
  // or:     
  myMessageQueueClient.Publish(&quot;Test&quot;, new Message&lt;CoreEvent&gt;(testReq));
  </code></pre>
  <p>In both cases, you specify the channel name yourself. This is the behaviour I am seeing:</p>
  <ul>
  <li>the subscriber above only receives the message if I use <code>IRedisClient.PublishMessage(string toChannel, string message)</code> and never if I use <code>IMessageQueueClient.Publish(string queueName, IMessage message)</code></li>
  <li>If I publish using <code>IRedisClient.PublishMessage</code>, I expected the &quot;Test&quot; channel to be populated (if I view with a Redis browser), but it is not. I never see any trace of the queue (let's say I don't start the subscription, but producers adds messages)</li>
  <li>If I publish using <code>IMessageQueueClient.Publish(string queueName, IMessage message)</code>, the channel &quot;Test&quot; is created and the messages are persisted there, but never popped/fetched-and-deleted.</li>
  </ul>
  <p>I want to understand the difference between the two. I have looked at source code and read all I can about it, but I haven't found any documentation regarding <code>IRedisClient.PublishMessage</code>.</p>