title: Redis publishing when no subscriber
body: <p>In Redis pub/sub if something is published when there is no subscriber, data is kind of lost.</p>
  
  <p>What i wanted is kind of notification to publisher when subscriber is subscribed.</p>
  
  <p>One way could be keep publishing in a loop and break the loop when publisher find at least one subscriber. But i don't think thats a good way. (Also i can't keep exponential back off).</p>
  
  <pre><code>while(1) {
      $numOfSubscriber = $redis-&gt;publish($channel1, $encodePublish);
      if($numOfSubscriber &gt; 0)
          break;
  }
  </code></pre>
  
  <p>Is there any better way to solve the same issue?</p>
  
  <p>I am using Predis.</p>