Fork me on GitHub

I would make some kind of sqs object with the only operation being given a queue and a callback, pull from the queue and hand messages to the callback, and then other code can register itself to handle messages more flexibly then using the defmulti approach. I might implement that by implementing the Pub protocol from core.async where sqs queue names would be topics, but getting that to work correctly (stop pulling messages when there are no subscriptions) could be tricky so I might leave out the protocol


Hey @U0NCTKEV8 , I like the callback idea . How can I do that ? Can’t seeing how to do . Correct me if I’m wrong Sqs record which implement the QueueProtocol , right ? Would love to see how register callback as you said instead of multi methods


Could you provide a small example how to do that ?


wrote the gist with the code to make it easy the reading ->