Skip to content

Issue with send feature for fifo queues #2

Description

@astyves-seedbox

Hello!

var response = await sqs.SendMessageAsync(new SendMessageRequest(queueUrl, messageBody));

To be able to send a message to a Fifo queue we need to specify a MessageGroupId and a MessageDeduplicationId.

As a quick fix, I suggest to add this to fix the problem:

            var message = new SendMessageRequest(queueUrl, messageBody);

            if (queueUrl.EndsWith(".fifo", StringComparison.OrdinalIgnoreCase))
                message.MessageGroupId = Guid.NewGuid().ToString();
                message.MessageDeduplicationId = Guid.NewGuid().ToString();

            var response = await sqs.SendMessageAsync(message);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions