Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Retry on Publish Fail Python Library

Hi Michael,

Could you provide a stripped down working code example that exhibits
the problem? It is useful to see exactly what you're doing in case I
make an incorrect assumption.

Regards,

Roger


On Mon, Jan 26, 2015 at 2:39 PM, Michael Caulley <mike@xxxxxxxxxxxxxx> wrote:
> I am using the python pah-mqtt 1.0 library with django.  I am using the
> on_publish() callback to verify that messages have been sent.  Occasionally
> I never receive the callback and assume the message failed to send, so I
> retry.  My retry always exhibits the same issue, preventing me have having a
> successful retry.
>
> The general structure of the code is,
>
> Call the publish() function.  Create a new timer thread that waits 10
> seconds and checks an array for mid number of the message just published.
> When the on_publish() callback is called I save the mid number into an
> array, so that when the 10 second timer expires we can check for it, if it
> is there we know the message was sent OK, else it was not.  If at the
> expiration time of the 10 seconds the mid number is not in the array I can
> publish again.  This publish never seems to work.
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top