Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not apply prefix to queues configured as URL or ARN #667

Merged
merged 5 commits into from
Jun 23, 2021

Conversation

gondalez
Copy link
Contributor

@gondalez gondalez commented Jun 22, 2021

💁 View per-commit for red -> green spec journey.

🤔 Issue

What problem are you trying to solve?

When queue name prefixing is enabled, prefixes are applied to ARN and URL based queues.

# in our case this is configured via the ActiveJob integration
config.active_job.queue_name_prefix = 'my_prefix'
groups:
  normal:
    concurrency: 2
    polling_strategy: StrictPriority
    queues:
      - arn:aws:sqs:fake-region-1:12345:my_queue_name
      - https://example.co/my_queue_name_2
ArgumentError: The specified queue(s) my_prefix_arn:aws:sqs:fake-region-1:12345:my_queue_name do not exist.
ArgumentError: The specified queue(s) my_prefix_https://example.co/my_queue_name_2 do not exist.

😌 Solution

How did you solve the problem?

Skip applying prefix to queues configured via ARN or URL.
Still apply the prefix to queues configured via name.

🔬 Testing

How did you test this?

✅ specs
✅ local sanity check integrated with our rails app

@gondalez gondalez changed the title Do not apply prefix to queues confgired as URL or ARN Do not apply prefix to queues configured as URL or ARN Jun 22, 2021
@cjlarose cjlarose self-requested a review June 22, 2021 16:57
Copy link
Contributor

@cjlarose cjlarose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks!

@cjlarose cjlarose merged commit e4527ba into ruby-shoryuken:master Jun 23, 2021
@cjlarose
Copy link
Contributor

Published in shoryuken version 5.2.2

@gondalez gondalez deleted the prefix-skip branch August 26, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants