Fork me on GitHub

Is there a well-behaved sqs worker component that can be started/stopped cleanly? I'd essentially like to pass a function and then have it stop processing when I stop my system.


after light googling, found this which seems close enough:


i chose that one recently, kinda regretted it. wish i'd just built my own stuff atop AWS sdk


it does a lot of stuff magically/automatically, like creating queues and setting their defaults. also brings in core.async and is oriented around throughput


might be good if you're going for high throughput... but our situation is usually small number of messages that absolutely must be tried/retried


good feedback, thanks


I already have an abstraction that I was using with storm spouts. Actually core.async based already, a component that puts channels at :messages, :acks, :fails where you take from :messages [receipt-handle msg] and then put the receipt-handle back to :acks, :fails, but I never wrote in a layer to enable stopping (alting on a coordination channel). It might be worth it to just wrap that layer and do the work to enable cleanup of the goroutines/threads.


yeah - sounds like you already basically have what you want