propono icon indicating copy to clipboard operation
propono copied to clipboard

Way to use FIFO queues?

Open bokmann opened this issue 8 years ago • 5 comments

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...

bokmann avatar Aug 22 '17 15:08 bokmann

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! :)

iHiD avatar Aug 22 '17 19:08 iHiD

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.

dougal avatar Oct 19 '17 17:10 dougal

That's a nice idea. I'd be up for that as an implementation.

iHiD avatar Oct 19 '17 21:10 iHiD

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.

bokmann avatar Aug 16 '18 10:08 bokmann

It would be nice to have FIFO support

prem-prakash avatar Feb 16 '21 14:02 prem-prakash