poundifdef / smoothmq

An improved drop-in replacement for SQS
https://www.smoothmq.com
GNU Affero General Public License v3.0
2.13k stars 37 forks source link

Error in a FIFO queue with per message group ID throughput limit #37

Open tecoad opened 1 month ago

tecoad commented 1 month ago

Hi @poundifdef ,

I just jumped for testing the tool as replacement for SQS, however i cannot reproduce sucessfuly the FIFO queue with per message group ID throughput limit.

This works in aws but not in smoothmq:

const command = new CreateQueueCommand({
    QueueName: 'test2',
    Attributes: {
        FifoQueue: 'true',
        VisibilityTimeout: '30',
        DeduplicationScope: 'messageGroup',
        FifoThroughputLimit: 'perMessageGroupId',
    },
})

const command = new SendMessageCommand({
    QueueUrl,
    MessageBody: 'receiving message',
    MessageAttributes: {
        MessageId: {
            DataType: 'String',
            StringValue: '123',
        },
    },
    MessageDeduplicationId: `${Math.random().toString(36).substring(2, 15)}`,
    MessageGroupId: 'MYGROUP1',
})

I can add values to the queue, but the FIFO per messageGroupId is not being respected as it should be (records from the same message group returns in the immediate subsequent ReceiveMessageCommand.) The only difference I can notice is that AWS states that fifo queues should end with .fifo, however if i try to create this with as queuename 'test2.fifo', i get the " SQSServiceException [ValidationError]: Invalid request payload" error.

All same commands works fine in AWS but not in SmoothMq.

Another issue i noticed: hasnt delete queue been implemented? If i try to delete queue, i get 'UnsupportedOperation: SQS method AmazonSQS.DeleteQueue not implemented' error.

Thank you.

poundifdef commented 1 month ago

Thanks for the report! You're correct:

  1. FIFO queues aren't currently implemented
  2. DeleteQueue is not implemented. The code is there - there's a function to delete queues, which you can do in the UI, but I haven't exposed it as an AWS endpoint.
tecoad commented 1 month ago

Oh, ok! Thanks for the quick answer @poundifdef The project looks promising, I hope it evolves! It would be nice to update readme with progress and currently (un)available features, so many coming to be issues will be avoided as well.