Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Add AMQP exchange binding to another exchange #34737

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

Conversation

danielkorytek
Copy link

@danielkorytek danielkorytek commented Dec 1, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR

This PR is adding possiblity to bind exchange to another exchange via transport configuration.

Example:

transports:
  first:
    dsn: 'amqp://'
    options:
      exchange:
        name: first_exchange
        type: topic
  second:
    dsn: 'amqp://'
    options:
      queues:
        second:
          binding_keys:
            - 'key.*'
      exchange:
        name: second_exchange
        type: topic
        bindings:
          first_exchange:
            binding_keys: #optional
              - '*'
            binding_arguments: [] #optional

In this example, we binding second_exchange to first_exchange with optional binding_keys and binding_arguments.

If message will be published on first_exchange, second_exchange will also have that message, and could be consumed by second transport worker.

@danielkorytek danielkorytek requested a review from sroze as a code owner December 1, 2019 10:53
@danielkorytek danielkorytek force-pushed the messenger/amqp_bing_exchange_to_another_exchange branch from 9f4b69f to cfa77e6 Compare December 1, 2019 13:20
@nicolas-grekas nicolas-grekas added this to the next milestone Dec 2, 2019
@danielkorytek danielkorytek force-pushed the messenger/amqp_bing_exchange_to_another_exchange branch 2 times, most recently from 87bad8c to d4e0367 Compare December 3, 2019 21:17
@danielkorytek danielkorytek force-pushed the messenger/amqp_bing_exchange_to_another_exchange branch from d4e0367 to e2b0920 Compare December 11, 2019 20:38
@danielkorytek danielkorytek force-pushed the messenger/amqp_bing_exchange_to_another_exchange branch from e2b0920 to 8f89e3c Compare December 20, 2019 10:06
@Nyholm
Copy link
Member

Nyholm commented Jan 19, 2020

Thank you for this PR.

Could you help me understand why you want to bind one exchange to another? With the little AMQP I know, I can only believe that this is only for very advanced use cases, right?

What Im currently considering is, if this is a feature we say it to advanced/rare... Any maybe it should be better if you configured this AMQP routing with AMQP tools instead.

Please help me understand this better. What is the scenarios this feature is useful?

@Tobion
Copy link
Contributor

Tobion commented Jan 28, 2020

Please explain the use-case. I also don't see the need yet for this in symfony messenger config. It can be solved in user-land.

@fabpot
Copy link
Member

fabpot commented Feb 11, 2020

Closing as there is no feedback. Feel free to add a use case so that we can discuss this PR further. Thank you.

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

Successfully merging this pull request may close these issues.

6 participants