Enter snakeMQ. I was thinking that I could write a small script that motion calls instead of wput, which just pushes the image path onto a queue and exits. And then have a listener running continuously that pops the paths off the queue and uses wput to upload them one by one in queued order.
So the system must support multiple processes (launched by motion) possibly trying to push to the queue concurrently and the processes launched by motion should be able to exit right away, regardless of how many messages are in the queue.
I did a simple test where I created a listener that simulated FTP upload time by having a sleep() in on_recv() but the sender would hang while the listener was in the sleep(), so there was no actual queue, just one message handled at a time. In the sender, I have a sys.exit() in on_sent(), so that it exits out once the message has been sent.
Thanks for any info.
It seems that, if I was to implement a resident sender, I might as well queue the messages there and do the uploads directly, circumventing a third party mq altogether. So, for this particular project, I went with beanstalkd and the beanstalkc wrapper for Python, which let me implement it like I first outlined.
I'll keep snakeMQ in mind for any future mq needs. Thanks again.