<div dir="ltr">Thanks Gord for the explanation.<div><br></div><div>Nader.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 5, 2015 at 11:49 AM, gord chung <span dir="ltr"><<a href="mailto:gord@live.ca" target="_blank">gord@live.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    my understanding is that if you are calling stop()/wait() your
    intention is to shut down the listener. if you intend on keeping an
    active consumer on the queue, you shouldn't be calling either stop()
    or wait(), just start.<div><div class="h5"><br>
    <br>
    <div>On 05/11/2015 2:07 PM, Nader Lahouti
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks for the pointer, I'll look into it. But one
          question, by calling stop() and then wait(), does it mean the
          application has to call start() again after the wait()? to
          process more messages?</div>
        <div><br>
        </div>
        <div>I am also using  <a href="http://docs.openstack.org/developer/oslo.messaging/server.html" target="_blank">http://docs.openstack.org/developer/oslo.messaging/server.html</a>
          for the RPC server </div>
        <div>Does it mean there has to be stop() and then wait() there
          as well?</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Nader.</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Nov 5, 2015 at 10:19 AM, gord
          chung <span dir="ltr"><<a href="mailto:gord@live.ca" target="_blank">gord@live.ca</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
              <br>
              On 05/11/2015 1:06 PM, Nader Lahouti wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                Hi Doug,<br>
                <br>
                I have an app that listens to notifications and used the
                info provided in<br>
                <a href="http://docs.openstack.org/developer/oslo.messaging/notification_listener.html" rel="noreferrer" target="_blank">http://docs.openstack.org/developer/oslo.messaging/notification_listener.html</a><br>
                <br>
                <br>
                Basically I create<br>
                1. NotificationEndpoints(object):<br>
                <a href="https://github.com/openstack/networking-cisco/blob/master/networking_cisco/apps/saf/common/rpc.py#L89" rel="noreferrer" target="_blank">https://github.com/openstack/networking-cisco/blob/master/networking_cisco/apps/saf/common/rpc.py#L89</a><br>
                2. NotifcationListener(object):<br>
                <a href="https://github.com/openstack/networking-cisco/blob/master/networking_cisco/apps/saf/common/rpc.py#L100" rel="noreferrer" target="_blank">https://github.com/openstack/networking-cisco/blob/master/networking_cisco/apps/saf/common/rpc.py#L100</a><br>
                3. and call start() and  then wait()<br>
              </blockquote>
              <br>
            </span>
            the correct usage is to call stop() before wait()[1]. for
            reference on how to use listeners, you can see Ceilometer[2]<br>
            <br>
            [1]<a href="http://docs.openstack.org/developer/oslo.messaging/notification_listener.html" rel="noreferrer" target="_blank">http://docs.openstack.org/developer/oslo.messaging/notification_listener.html</a><br>
            [2] <a href="https://github.com/openstack/ceilometer/blob/master/ceilometer/utils.py#L250" rel="noreferrer" target="_blank">https://github.com/openstack/ceilometer/blob/master/ceilometer/utils.py#L250</a><span><font color="#888888"><br>
                <br>
                -- <br>
                gord</font></span>
            <div>
              <div><br>
                <br>
                <br>
__________________________________________________________________________<br>
                OpenStack Development Mailing List (not for usage
                questions)<br>
                Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
                <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
    </div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
gord</pre>
  </font></span></div>

<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>