laravel-aws-worker icon indicating copy to clipboard operation
laravel-aws-worker copied to clipboard

Support for FIFO queues?

Open mstnorris opened this issue 7 years ago • 3 comments

Hi there, do you plan on building in support for FIFO queues?

mstnorris avatar Jan 02 '18 14:01 mstnorris

@mstnorris hmm, how does it affect the worker exactly? I thought it's just an AWS setting and the worker wouldn't even realize it's popping from a FIFO queue?

dusterio avatar Jan 04 '18 00:01 dusterio

Hey @dusterio, I've just tried and assigned one of my workers to use a newly created FIFO queue. Seems like it didn't work. I was forced by AWS to end the name of the queue with .fifo. Should I use this suffix for the Laravel queue settings, too?

TorbenL avatar Jan 07 '19 11:01 TorbenL

bumping this

FIFO queues require an additional field to be POSTed to SQS: MessageGroupId

Notes on this field from AWS:

This parameter applies only to FIFO (first-in-first-out) queues.

The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). To interleave multiple ordered streams within a single queue, use MessageGroupId values (for example, session data for multiple users). In this scenario, multiple consumers can process the queue, but the session data of each user is processed in a FIFO fashion.

You must associate a non-empty MessageGroupId with a message. If you don't provide a MessageGroupId, the action fails. ReceiveMessage might return messages with multiple MessageGroupId values. For each MessageGroupId, the messages are sorted by time sent. The caller can't specify a MessageGroupId. The length of MessageGroupId is 128 characters. Valid values: alphanumeric characters and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon Simple Queue Service Developer Guide.

Important MessageGroupId is required for FIFO queues. You can't use it for Standard queues. Type: String

Required: No

alexleeelkins avatar Apr 02 '20 13:04 alexleeelkins