Skip to content

When queue is aws fifo (name needs to end with .fifo) and push notification is true, sns topic cant be created #131

Description

The error ive got is:
InvalidParameter
Invalid parameter: Topic Name

I have debugged and saw that the method getNameWithPrefix of AbstractProvider.php should have a way to preserve the ".fifo" extension to be used in the sqs queue create method, QueueName parameter

Did quick adjustment just make it pass, maybe you will find more elegant solution.
public function getNameWithPrefix($removeFifoExtension=true)
{
if (!empty($this->options['queue_name'])) {
if($removeFifoExtension) {
return str_replace('.fifo', '', $this->options['queue_name']);
} else {
return $this->options['queue_name'];
}
}
return sprintf("%s_%s", self::QPUSH_PREFIX, $this->name);
}

Then in AwsProvider.php file in line 405 add the false parameter preserve fifo extension in aws sqs queue name creation
$result = $this->sqs->createQueue(['QueueName' => $this->getNameWithPrefix(false), 'Attributes' => $attributes]);

Hope you can incorporate this to the project soon, thank you the bundle looks very good!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions