On Wed, May 14, 2014 at 4:33 PM, Alan Conway <[email protected]> wrote:

> I've been playing with Messenger and I've found I need to do this if I
> want to be sure it has done what I've asked it to do:
>
>     def flush(self):
>         """Call work() till there is no work left."""
>         while self.work(0.01): pass
>
>
> I've found I need to do this after subscribe() and accept() if I want to
> be sure the action has been carried out. (e.g. because I want to check
> if the corresponding message has been removed from a broker.)
>
> Is there a better way of doing this? If not should we add something like
> this to messenger API?
>

You are supposed to be able to check the tracker status for your message to
figure stuff like this out, although we may not (yet) expose a state that
would correspond to the message being dequeued.


>
> This would be analogous to the sync() call and sync arguments in the
> qpid.messaging API.
>

I don't think we need a sync() analog (at least not for this case) since it
seems like what you care about has mostly to do with the message, i.e. did
I get the message I want and has it reached the appropriate state.

--Rafael

Reply via email to