Skip to content

[AmazonSqsMessenger] DSN queue name overrides queue_name from options #44254

@Antipov-Anton

Description

@Antipov-Anton

Symfony version(s) affected

5.3

Description

As example I want to configure transport like

(messenger.yaml)

framework:
    messenger:
        transports:
            queue1:
                dsn: "%env(MESSENGER_TRANSPORT_DSN)%"
            queue2:
                dsn: "%env(MESSENGER_TRANSPORT_DSN)%"
                options:
                  queue_name: queue2
            queue3:
                dsn: "%env(MESSENGER_TRANSPORT_DSN)%"
                options:
                  queue_name: queue3

and my dsn string looks like
https://sqs.us-west-1.amazonaws.com/111111111111/my_queue?access_key=***&secret_key=***

Currently for this case all 3 transports will work with queue named my_queue from dsn string.

I expects what options will override dsn values.

Code: https://github.com/symfony/amazon-sqs-messenger/blob/5.3/Transport/Connection.php#L160-L163

How to reproduce

Use code config snippet from description and try to work with it.

Possible Solution

Check if queue_name option passed and use it instead of name from dsn string.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy