propono
propono copied to clipboard
Way to use FIFO queues?
Amazon SQS supports FIFO queues:
https://aws.amazon.com/about-aws/whats-new/2016/11/amazon-sqs-introduces-fifo-queues-with-exactly-once-processing-and-lower-prices-for-standard-queues/
Any consideration given to supporting this?
My initial investigation of the code makes it seem like it would just require an update to the Fog-AWS dependency and some new options passed at queue creation time... but I'm not sure what I'd want the semantics of the setup to look like... is this something set on Propono.config before we publish to the queue? The actual creation of the queue is hidden from the usage of the api...
Hey @bokmann. So we're close to publishing v2 (see the branch) which dispenses with Fog for the AWS gem. I'll look at the option of FIFO as part of that. Thanks! :)
Had a thought about this while looking into other queue attributes (issue for that to follow later). The SQS API enforces that all FIFO queues must end in .fifo. Perhaps then, if the name of the queue when publishing ends in .fifo, and the queue does not exist, then a FIFO queue is created.
Regular queues:
Propono::Client.new.listen('some-topic') { |message| puts "I just received: #{message}" }
Propono::Client.new.publish('some-topic', "The Best Message Ever")
FIFO queues:
Propono::Client.new.listen('some-topic.fifo') { |message| puts "I just received: #{message}" }
Propono::Client.new.publish('some-topic.fifo', "The Best Message Ever")
Assumes that the corrupt, slow, and failed queues are also created as FIFO queues, with appropriate names.
That's a nice idea. I'd be up for that as an implementation.
So does this work yet? It looks like just giving the queue the right name or putting .fifo in the config’s queue_suffix might do this.
It would be nice to have FIFO support