title: While loop is not breaking getting error
body: <p>I am trying to retry the rabbitmq message publishing if the response from rabbitmq is <code>nack</code>. If the response is <code>ack</code> means the message which I am retrying is published then I want to break the loop. But I am getting this error. I have no idea whats this error means here. </p>
  
  <blockquote>
    <p>Cannot break/continue 1 level(s)</p>
  </blockquote>
  
  <p>Here is my code</p>
  
  <pre><code>    while($i &lt;= 10) {
                $this-&gt;channel-&gt;queue_declare($queueName, false, true, false, false);
                $this-&gt;channel-&gt;basic_publish($queueMsg, $exchange, '');
  
                $this-&gt;channel-&gt;wait_for_pending_acks();
  
                //Negative Ack
                $this-&gt;channel-&gt;set_nack_handler(
                    log("Message Nacked with content, start retrying ");
                    continue;
                );
  
                //Positive Ack
                $this-&gt;channel-&gt;set_ack_handler(
                   log("Message acked with content ");
                   break; /*I want to break this loop here once message published successfully*/
                    );
                $i++;
              }
  </code></pre>